diff --git a/machines/terra/modules.nix b/machines/terra/modules.nix index 0c44ecd..bce392e 100644 --- a/machines/terra/modules.nix +++ b/machines/terra/modules.nix @@ -57,6 +57,7 @@ apps = { dev.enable = true; visual.enable = true; + gaming.enable = true; terminal = { enable = true; zsh.enable = true; diff --git a/modules/apps/default.nix b/modules/apps/default.nix index 69fadf1..a5f32af 100644 --- a/modules/apps/default.nix +++ b/modules/apps/default.nix @@ -9,5 +9,7 @@ ./visual/firefox.nix ./server.nix + + ./gaming.nix ]; } diff --git a/modules/apps/gaming.nix b/modules/apps/gaming.nix new file mode 100644 index 0000000..a88704f --- /dev/null +++ b/modules/apps/gaming.nix @@ -0,0 +1,24 @@ +{ + lib, + config, + pkgs, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.horseman.apps.gaming; +in { + options = { + horseman.apps.gaming = { + enable = mkEnableOption "Games and things for games"; + }; + }; + + config = mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = false; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + }; + }; +} diff --git a/modules/apps/terminal/zsh.nix b/modules/apps/terminal/zsh.nix index acabbe4..5c5642f 100644 --- a/modules/apps/terminal/zsh.nix +++ b/modules/apps/terminal/zsh.nix @@ -5,7 +5,7 @@ ... }: let inherit (lib) mkEnableOption mkIf; - cfg = config.horseman.terminal.zsh; + cfg = config.horseman.apps.terminal.zsh; in { options = { horseman.apps.terminal.zsh = { diff --git a/modules/default.nix b/modules/default.nix index ed09c87..650757a 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -3,7 +3,6 @@ ./apps ./hardware ./network - ./terminal ./wm ./users ./boot