From 6325f6266e0f623e0e4066b3de7eeecefd5bef68 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Mon, 27 Jan 2025 19:57:02 -0600 Subject: [PATCH] add steam module sadly this has to be a system package until we find a non shitty way of installing in through hm --- nixos/default.nix | 11 ++++++++++- nixos/steam.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 nixos/steam.nix 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 + ]; + }; + }; +}