diff --git a/configs/nixos/hosts/zeus/default.nix b/configs/nixos/hosts/zeus/default.nix index 8590f38..faff8ee 100644 --- a/configs/nixos/hosts/zeus/default.nix +++ b/configs/nixos/hosts/zeus/default.nix @@ -1,15 +1,11 @@ { config, lib, - pkgs, ... }: # zeus — Ryzen desktop with AMD graphics. # Disk layout is in ./disk.nix. # `fileSystems` are derived from it, none declared here. -let - steamVrLauncher = "/home/${config.user.name}/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher"; -in { imports = [ ./disk.nix @@ -53,27 +49,6 @@ in modules.desktop.apps.steam.enable = true; modules.desktop.apps.vencord.enable = true; - networking.firewall.allowedUDPPorts = [ 10400 ]; - - programs.gamescope.capSysNice = true; - - systemd.paths.steamvr-capabilities = { - wantedBy = [ "multi-user.target" ]; - pathConfig = { - PathChanged = steamVrLauncher; - Unit = "steamvr-capabilities.service"; - }; - }; - - systemd.services.steamvr-capabilities = { - wantedBy = [ "multi-user.target" ]; - path = [ pkgs.libcap ]; - script = '' - setcap cap_sys_nice=eip ${lib.escapeShellArg steamVrLauncher} - ''; - serviceConfig.Type = "oneshot"; - }; - home-manager.users.${config.user.name}.wayland.windowManager.hyprland.settings.monitor = [ { output = "HDMI-A-1"; diff --git a/configs/nixos/modules/desktop/apps/steam.nix b/configs/nixos/modules/desktop/apps/steam.nix index 8ffe66f..a5405b8 100644 --- a/configs/nixos/modules/desktop/apps/steam.nix +++ b/configs/nixos/modules/desktop/apps/steam.nix @@ -6,6 +6,9 @@ ... }: # Steam game launcher and runtime integration. +let + steamVrLauncher = "/home/${config.user.name}/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor-launcher"; +in { options.modules.desktop.apps.steam.enable = lib.mkEnableOption "Steam game launcher"; @@ -21,7 +24,29 @@ hardware.steam-hardware.enable = true; - programs.gamescope.enable = true; + programs.gamescope = { + enable = true; + capSysNice = true; + }; + + networking.firewall.allowedUDPPorts = [ 10400 ]; + + systemd.paths.steamvr-capabilities = { + wantedBy = [ "multi-user.target" ]; + pathConfig = { + PathChanged = steamVrLauncher; + Unit = "steamvr-capabilities.service"; + }; + }; + + systemd.services.steamvr-capabilities = { + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.libcap ]; + script = '' + setcap cap_sys_nice=eip ${lib.escapeShellArg steamVrLauncher} + ''; + serviceConfig.Type = "oneshot"; + }; registry.window-icon.${config.networking.hostName}.steam = { class = "[Ss]team";