From 6c5210cf6618c7c904fe6180a46d0cc3de2848bd Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Thu, 13 Aug 2026 14:57:34 +0200 Subject: [PATCH] add steam Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- hosts/laptop/configuration.nix | 1 + nixos/steam.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 nixos/steam.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index b4c122e4..5acd266b 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -13,6 +13,7 @@ ../../nixos/utils.nix ../../nixos/hyprland.nix ../../nixos/usbguard.nix + ../../nixos/steam.nix ../../home/programs/gui/helium/system.nix # I hate browser's configuration.. ../../nixos/omen.nix # CHANGEME: For my laptop only, remove this (OMEN 16) diff --git a/nixos/steam.nix b/nixos/steam.nix new file mode 100644 index 00000000..67f49033 --- /dev/null +++ b/nixos/steam.nix @@ -0,0 +1,30 @@ +# Source: https://github.com/Dylouwu/MyNixy/blob/main/nixos/steam.nix +{ + config, + pkgs, + ... +}: { + programs.steam = { + enable = true; + gamescopeSession.enable = true; + }; + + environment.systemPackages = with pkgs; [ + mangohud + protonup-ng + ]; + + environment.sessionVariables = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${config.var.username}/.steam/root/compatibilitytools.d"; + }; + + programs.gamemode.enable = true; +} +# Example of recommanded launch options for your games in Steam : +# Regular gaming : +# LD_PRELOAD="" gamescope -W 2560 -H 1440 -r 360 -f -- %command% +# LD_PRELOAD="" gamescope -W 3440 -H 1440 -r 140 -f -- %command% +# HDR gaming : +# LD_PRELOAD="" ENABLE_HDR_WSI=1 gamescope -w 2560 -h 1440 -r 360 -f --hdr-enabled --hdr-debug-force-output --hdr-sdr-content-nits 600 -- env ENABLE_GAMESCOPE_WSI=1 DXVK_HDR=1 DISABLE_HDR_WSI=1 VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait %command% +# LD_PRELOAD="" removes a glitch causing games to slow down after roughly 24 minutes +# For the rest of the command, you can change the values to match your screen resolution and refresh rate