Add steam module

This commit is contained in:
Joshua Yuen 2026-09-28 20:42:59 -04:00
parent dfbc3540e6
commit 2efa87f90c
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
6 changed files with 39 additions and 0 deletions

View File

@ -18,4 +18,6 @@
modules.opencode.enable = true;
modules.display.scale = 2;
modules.steam.remotePlay.enable = true;
}

View File

@ -17,6 +17,7 @@
./plasma.nix
./sddm.nix
./services.nix
./steam.nix
./stylix.nix
./system.nix
./tailscale.nix

20
modules/nixos/steam.nix Normal file
View File

@ -0,0 +1,20 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.steam;
in
{
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = cfg.remotePlay.enable;
dedicatedServer.openFirewall = cfg.remotePlay.enable;
};
hardware.steam-hardware.enable = true;
};
}

View File

@ -16,6 +16,7 @@
./plasma.nix
./screenshot.nix
./shell.nix
./steam.nix
./system.nix
./tailscale.nix
./vm.nix

13
modules/options/steam.nix Normal file
View File

@ -0,0 +1,13 @@
{
lib,
...
}:
with lib;
{
options.modules.steam = {
enable = mkEnableOption "Steam";
remotePlay = {
enable = mkEnableOption "Steam Remote Play firewall rules";
};
};
}

View File

@ -29,4 +29,6 @@
modules.screenshot.enable = true;
modules.tailscale.enable = true;
modules.steam.enable = true;
}