diff --git a/nixos/default.nix b/nixos/default.nix index 0967ef4..7ac7e21 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1 +1,10 @@ -{} +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ./steam.nix + ]; +} diff --git a/nixos/steam.nix b/nixos/steam.nix new file mode 100644 index 0000000..057d0d2 --- /dev/null +++ b/nixos/steam.nix @@ -0,0 +1,30 @@ +{ + 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 + ]; + }; + }; +}