diff options
| author | Fabian Montero <fabian@posixlycorrect.com> | 2025-01-27 19:57:02 -0600 |
|---|---|---|
| committer | Fabian Montero <fabian@posixlycorrect.com> | 2025-01-28 13:49:01 -0600 |
| commit | e0a1a512f54a27eff9877e2d5a2c5c216cc07c4e (patch) | |
| tree | 11d2c25b841c68a6093ed8117005321dbf2db44f | |
| parent | 1f774d2c89b757ff03894d26923d15af0d787857 (diff) | |
add steam module
sadly this has to be a system package until we find a non shitty way of
installing in through hm
| -rw-r--r-- | nixos/default.nix | 11 | ||||
| -rw-r--r-- | nixos/trash/default.nix | 10 | ||||
| -rw-r--r-- | nixos/trash/steam/default.nix | 55 |
3 files changed, 75 insertions, 1 deletions
diff --git a/nixos/default.nix b/nixos/default.nix index 0967ef4..2440c30 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1 +1,10 @@ -{} +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ./trash + ]; +} diff --git a/nixos/trash/default.nix b/nixos/trash/default.nix new file mode 100644 index 0000000..a8c8785 --- /dev/null +++ b/nixos/trash/default.nix @@ -0,0 +1,10 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ./steam + ]; +} diff --git a/nixos/trash/steam/default.nix b/nixos/trash/steam/default.nix new file mode 100644 index 0000000..80a45e8 --- /dev/null +++ b/nixos/trash/steam/default.nix @@ -0,0 +1,55 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.options.trivium.trash.steam; +in { + options.trivium.trash.steam = { + enable = mkEnableOption "steam settings"; + + compatibilityPackages = mkOption { + type = types.bool; + default = true; + description = "Enable additional compatibility packages (protontricks, protonup, etc.)"; + }; + + remotePlayOpenFirewall = mkOption { + type = types.bool; + default = false; + description = "Open firewall for Steam Remote Play"; + }; + + dedicatedServerOpenFirewall = mkOption { + type = types.bool; + default = false; + description = "Open firewall for Steam Dedicated Server"; + }; + + localNetworkGameTransfersOpenFirewall = mkOption { + type = types.bool; + default = false; + description = "Open firewall for Steam Local Network Game Transfers"; + }; + }; + + config = mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = cfg.remotePlayOpenFirewall; + dedicatedServer.openFirewall = cfg.dedicatedServerOpenFirewall; + localNetworkGameTransfers.openFirewall = cfg.localNetworkGameTransfersOpenFirewall; + }; + + environment = mkIf cfg.compatibilityPackages { + systemPackages = with pkgs; [ + protontricks + protonup + protonup-ng + winetricks + ]; + }; + }; +} |
