diff --git a/home/modules/default.nix b/home/modules/default.nix index 31109a9..fb90319 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -8,7 +8,7 @@ ./terminal ./neovim.nix ./baseline.nix - ./gaming + ./gaming.nix ./yubikey.nix ./browsers.nix ./gui diff --git a/home/modules/gaming/default.nix b/home/modules/gaming.nix similarity index 64% rename from home/modules/gaming/default.nix rename to home/modules/gaming.nix index 5be0efd..5048854 100644 --- a/home/modules/gaming/default.nix +++ b/home/modules/gaming.nix @@ -12,11 +12,6 @@ in { }; config = mkIf cfg.enable { home.packages = [ - # Steam. todo: move to the steam module later - (pkgs.callPackage ./package.nix {}) - pkgs.protonup - pkgs.winetricks - pkgs.protontricks pkgs.lutris pkgs.openrct2 pkgs.prismlauncher diff --git a/home/modules/gaming/package.nix b/home/modules/gaming/package.nix deleted file mode 100644 index 19f241f..0000000 --- a/home/modules/gaming/package.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - writeShellScriptBin, - steam-run, - steam, - ... -}: -writeShellScriptBin "steam" '' - exec ${steam-run}/bin/steam-run ${steam}/bin/steam -console -'' diff --git a/sys/modules/default.nix b/sys/modules/default.nix index 2cdd9a2..27d719e 100644 --- a/sys/modules/default.nix +++ b/sys/modules/default.nix @@ -14,5 +14,6 @@ ./users.nix ./bluetooth.nix ./net.nix + ./steam.nix ]; } diff --git a/sys/modules/steam.nix b/sys/modules/steam.nix new file mode 100644 index 0000000..a6cd543 --- /dev/null +++ b/sys/modules/steam.nix @@ -0,0 +1,31 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.sys.steam; +in { + options.local.sys.steam = { + enable = mkEnableOption "steam settings"; + }; + config = mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + + environment = { + systemPackages = with pkgs; + [ + protontricks + protonup + protonup-ng + winetricks + ]; + }; + }; +} diff --git a/sys/platforms/posixlycorrect/default.nix b/sys/platforms/posixlycorrect/default.nix index 23409ac..b4caa87 100644 --- a/sys/platforms/posixlycorrect/default.nix +++ b/sys/platforms/posixlycorrect/default.nix @@ -19,6 +19,7 @@ graphics.enable = true; virtualisation.enable = true; androidSupport.enable = true; + steam.enable = true; users = { fabian = {