diff options
| -rw-r--r-- | hosts/c-pc/configuration.nix | 7 | ||||
| -rw-r--r-- | snowfall/modules/nixos/apps/steam/default.nix | 18 | ||||
| -rw-r--r-- | snowfall/modules/nixos/suites/gaming/default.nix | 17 | ||||
| -rw-r--r-- | snowfall/systems/x86_64-linux/c-pc/default.nix | 1 |
4 files changed, 36 insertions, 7 deletions
diff --git a/hosts/c-pc/configuration.nix b/hosts/c-pc/configuration.nix index 31631c4..df060d0 100644 --- a/hosts/c-pc/configuration.nix +++ b/hosts/c-pc/configuration.nix @@ -47,14 +47,7 @@ }; }; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "steam" - "steam-unwrapped" - ]; - programs = { - steam.enable = true; - gnupg.agent = { enable = true; enableSSHSupport = true; diff --git a/snowfall/modules/nixos/apps/steam/default.nix b/snowfall/modules/nixos/apps/steam/default.nix new file mode 100644 index 0000000..b9baebf --- /dev/null +++ b/snowfall/modules/nixos/apps/steam/default.nix @@ -0,0 +1,18 @@ +{ options, config, lib, pkgs, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.apps.steam; +in { + options.${namespace}.apps.steam = with types; { + enable = mkEnableOption "steam"; + }; + + config = mkIf cfg.enable { + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "steam" + "steam-unwrapped" + ]; + + programs.steam.enable = true; + }; +} diff --git a/snowfall/modules/nixos/suites/gaming/default.nix b/snowfall/modules/nixos/suites/gaming/default.nix new file mode 100644 index 0000000..e95e1cd --- /dev/null +++ b/snowfall/modules/nixos/suites/gaming/default.nix @@ -0,0 +1,17 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.suites.gaming; +in { + options.${namespace}.suites.gaming = with types; { + enable = mkEnableOption "gaming"; + }; + + config = mkIf cfg.enable { + cxl = { + apps = { + steam.enable = true; + }; + }; + }; +} diff --git a/snowfall/systems/x86_64-linux/c-pc/default.nix b/snowfall/systems/x86_64-linux/c-pc/default.nix index cb968be..8d80b9a 100644 --- a/snowfall/systems/x86_64-linux/c-pc/default.nix +++ b/snowfall/systems/x86_64-linux/c-pc/default.nix @@ -15,6 +15,7 @@ with lib; with lib.${namespace}; { suites = { common.enable = true; desktop.enable = true; + gaming.enable = true; }; fonts.extra = with pkgs; [ |