From 9c7cc3e3a759f38c515e7b2e73dd2cbe5f1aaebf Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Tue, 3 Jun 2025 16:23:20 -0500 Subject: [PATCH] drafted out home manager steam configuration --- .../home-manager/leyla/packages/default.nix | 1 + configurations/nixos/horizon/configuration.nix | 2 +- .../nixos/twilight/configuration.nix | 2 +- .../home-manager-modules/programs/default.nix | 1 + .../home-manager-modules/programs/steam.nix | 17 +++++++++++++++++ modules/nixos-modules/home-manager/default.nix | 1 + modules/nixos-modules/home-manager/steam.nix | 18 ++++++++++++++++++ 7 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 modules/home-manager-modules/programs/steam.nix create mode 100644 modules/nixos-modules/home-manager/steam.nix diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix index 8f06441..5af20ef 100644 --- a/configurations/home-manager/leyla/packages/default.nix +++ b/configurations/home-manager/leyla/packages/default.nix @@ -46,6 +46,7 @@ in { jetbrains.idea-community.enable = true; vscode.enable = true; firefox.enable = true; + steam.enable = true; }) ]; } diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix index 5817e2b..8398a38 100644 --- a/configurations/nixos/horizon/configuration.nix +++ b/configurations/nixos/horizon/configuration.nix @@ -71,7 +71,7 @@ programs = { adb.enable = true; steam = { - enable = true; + # 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 }; diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix index 6cef2fb..cb3813e 100644 --- a/configurations/nixos/twilight/configuration.nix +++ b/configurations/nixos/twilight/configuration.nix @@ -188,7 +188,7 @@ cachefilesd ]; programs.steam = { - enable = true; + # 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 }; diff --git a/modules/home-manager-modules/programs/default.nix b/modules/home-manager-modules/programs/default.nix index aa15701..ee52da2 100644 --- a/modules/home-manager-modules/programs/default.nix +++ b/modules/home-manager-modules/programs/default.nix @@ -15,5 +15,6 @@ ./calibre.nix ./bruno.nix ./dbeaver.nix + ./steam.nix ]; } diff --git a/modules/home-manager-modules/programs/steam.nix b/modules/home-manager-modules/programs/steam.nix new file mode 100644 index 0000000..a754575 --- /dev/null +++ b/modules/home-manager-modules/programs/steam.nix @@ -0,0 +1,17 @@ +{ + lib, + pkgs, + config, + ... +}: { + options.programs.steam = { + enable = lib.mkEnableOption "enable steam"; + }; + + config = lib.mkIf config.programs.steam.enable { + home.packages = with pkgs; [ + steam + steam.run + ]; + }; +} diff --git a/modules/nixos-modules/home-manager/default.nix b/modules/nixos-modules/home-manager/default.nix index cab004b..10f86c7 100644 --- a/modules/nixos-modules/home-manager/default.nix +++ b/modules/nixos-modules/home-manager/default.nix @@ -4,5 +4,6 @@ ./flipperzero.nix ./i18n.nix ./openssh.nix + ./steam.nix ]; } diff --git a/modules/nixos-modules/home-manager/steam.nix b/modules/nixos-modules/home-manager/steam.nix new file mode 100644 index 0000000..d151bca --- /dev/null +++ b/modules/nixos-modules/home-manager/steam.nix @@ -0,0 +1,18 @@ +{ + lib, + config, + ... +}: let + setupSteam = + lib.lists.any + (value: value) + (lib.attrsets.mapAttrsToList (name: value: value.programs.steam.enable) config.home-manager.users); +in { + config = lib.mkIf setupSteam { + programs.steam = { + enable = true; + # TODO: figure out how to not install steam here + # package = lib.mkDefault pkgs.emptyFile; + }; + }; +}