modularize steam

This commit is contained in:
Fabian Montero 2025-01-27 19:52:25 -06:00
parent 9f0e9811e3
commit cbda46edd5
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
6 changed files with 34 additions and 15 deletions

View file

@ -14,5 +14,6 @@
./users.nix
./bluetooth.nix
./net.nix
./steam.nix
];
}

31
sys/modules/steam.nix Normal file
View file

@ -0,0 +1,31 @@
{
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
];
};
};
}