added mangohud
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
environment.systemPackages = [];
|
environment.systemPackages = [];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = myConfig.general.allowUnfree;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = myConfig.builds.builder.trustedUsers;
|
trusted-users = myConfig.builds.builder.trustedUsers;
|
||||||
|
|||||||
+12
-8
@@ -3,12 +3,16 @@
|
|||||||
myConfig,
|
myConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports =
|
||||||
../packages/hyprland/default.nix
|
[
|
||||||
../packages/hypridle/default.nix
|
../packages/hyprland/default.nix
|
||||||
../packages/hyprlock/default.nix
|
../packages/hypridle/default.nix
|
||||||
../packages/rofi/default.nix
|
../packages/hyprlock/default.nix
|
||||||
../packages/matugen/default.nix
|
../packages/rofi/default.nix
|
||||||
../packages/swww/default.nix
|
../packages/matugen/default.nix
|
||||||
];
|
../packages/swww/default.nix
|
||||||
|
]
|
||||||
|
++ lib.optionals (myConfig.linux.gaming == true) [
|
||||||
|
../packages/mangohud/default.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
# In your ~/.config/home-manager/home.nix (or a file imported by it)
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
# Home Manager modules usually get config and pkgs as arguments
|
|
||||||
let
|
|
||||||
# Define the custom Steam launcher script within Home Manager's scope.
|
|
||||||
# pkgs here refers to the pkgs available to your Home Manager environment.
|
|
||||||
steamGamescopeWrapper = pkgs.writeScriptBin "steam-gamescope-launcher" ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -xeuo pipefail
|
|
||||||
|
|
||||||
gamescopeArgs=(
|
|
||||||
--adaptive-sync
|
|
||||||
--hdr-enabled
|
|
||||||
--mangoapp
|
|
||||||
--rt
|
|
||||||
--steam
|
|
||||||
)
|
|
||||||
steamArgs=(
|
|
||||||
-pipewire-dmabuf
|
|
||||||
-tenfoot
|
|
||||||
)
|
|
||||||
mangoConfig=(
|
|
||||||
cpu_temp
|
|
||||||
gpu_temp
|
|
||||||
ram
|
|
||||||
vram
|
|
||||||
)
|
|
||||||
mangoVars=(
|
|
||||||
MANGOHUD=1
|
|
||||||
MANGOHUD_CONFIG="$(IFS=,; echo "$${mangoConfig[*]}")"
|
|
||||||
)
|
|
||||||
|
|
||||||
export PATH="${pkgs.gamescope}/bin:${pkgs.mangohud}/bin:$PATH"
|
|
||||||
|
|
||||||
export "$${mangoVars[@]}"
|
|
||||||
exec ${pkgs.gamescope}/bin/gamescope "$${gamescopeArgs[@]}" -- ${pkgs.steam}/bin/steam "$${steamArgs[@]}"
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
# You don't need 'programs.xdg.enable = true;' explicitly here in Home Manager;
|
|
||||||
# xdg.desktopEntries will be available directly once Home Manager is active.
|
|
||||||
|
|
||||||
# Home Manager usually manages user-level packages under `home.packages`.
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
protonup-qt
|
|
||||||
mangohud
|
|
||||||
goverlay
|
|
||||||
steamGamescopeWrapper # Add your wrapper script to your user's PATH
|
|
||||||
];
|
|
||||||
|
|
||||||
# Define the desktop entry within Home Manager's xdg.desktopEntries
|
|
||||||
xdg.desktopEntries.steam = {
|
|
||||||
name = "Steam (Gamescope)";
|
|
||||||
comment = "Launch Steam via Gamescope with MangoHud";
|
|
||||||
exec = "${steamGamescopeWrapper}";
|
|
||||||
icon = "steam";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
categories = ["Game" "Application"];
|
|
||||||
startupNotify = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# If you previously had services.getty.autologinUser, that remains in configuration.nix.
|
|
||||||
# Likewise for hardware.xone.enable and boot.kernelPackages.
|
|
||||||
|
|
||||||
# Note: programs.steam.enable, programs.gamescope.enable, hardware.xone.enable
|
|
||||||
# usually remain in configuration.nix (system-wide), as they install the programs
|
|
||||||
# and drivers for the whole system.
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.mangohud = {
|
||||||
|
enable = true;
|
||||||
|
enableSessionWide = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
+1
-1
@@ -3,9 +3,9 @@
|
|||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
programs.steam.enable = true;
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
# inputs.nix-gaming.packages.${pkgs.system}.default
|
# inputs.nix-gaming.packages.${pkgs.system}.default
|
||||||
pkgs.steam
|
|
||||||
pkgs.protonup-qt
|
pkgs.protonup-qt
|
||||||
];
|
];
|
||||||
# programs.steam.platformOptimizations.enable = true;
|
# programs.steam.platformOptimizations.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user