From bd7009850ac2d58c1fa015e16b843a21839889c1 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Sun, 7 Jan 2024 13:58:29 +0800 Subject: [PATCH] feat(steam): add steam program and directories --- faucet/steam/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 faucet/steam/default.nix diff --git a/faucet/steam/default.nix b/faucet/steam/default.nix new file mode 100644 index 00000000..3f1f1db1 --- /dev/null +++ b/faucet/steam/default.nix @@ -0,0 +1,23 @@ +{ pkgs +, lib +, config +, ... }: with lib; let + cfg = config.faucet.steam; +in { + options.faucet.steam = { + enable = mkEnableOption "steam software and environment"; + }; + + config = mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + + users.home.persist.directories = [ + ".local/share/Steam" + ".steam" + ]; + }; +}