summaryrefslogtreecommitdiff
path: root/nixos/trash/steam
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/trash/steam')
-rw-r--r--nixos/trash/steam/default.nix55
1 files changed, 55 insertions, 0 deletions
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
+ ];
+ };
+ };
+}