diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-02-08 15:09:38 -0800 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-04-14 18:58:50 -0700 |
| commit | 89911792efc07ce5dd52f3a9f5b2eb2046fd06a6 (patch) | |
| tree | b8655aa8823a16415da17c9ad36a3ada8667d02f /snowfall/modules | |
| parent | ea3a9439ca7ee6918397e54273c47f63e1a3faeb (diff) | |
migration: persist steam files
Diffstat (limited to 'snowfall/modules')
| -rw-r--r-- | snowfall/modules/home/apps/steam/default.nix | 30 | ||||
| -rw-r--r-- | snowfall/modules/home/suites/gaming/default.nix | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/snowfall/modules/home/apps/steam/default.nix b/snowfall/modules/home/apps/steam/default.nix new file mode 100644 index 0000000..9148b9d --- /dev/null +++ b/snowfall/modules/home/apps/steam/default.nix @@ -0,0 +1,30 @@ +{ options, config, osConfig, lib, pkgs, namespace, ... }: + +#NOTE: steam must be installed system-wide. +# This module does nothing unless steam is enabled at the +# system level as well. This is only a separate toggle so +# that not every user gets steam files in their home. +with lib; with lib.${namespace}; let + cfg = config.${namespace}.apps.steam; + oscfg = osConfig.${namespace}.apps.steam; + impermanence = config.${namespace}.impermanence; +in { + options.${namespace}.apps.steam = with types; { + enable = mkEnableOption "steam"; + }; + + config = mkIf (cfg.enable && oscfg.enable) { + home.persistence.${impermanence.location} = { + directories = [{ + directory = ".local/share/Steam"; + method = "symlink"; + }]; + }; + + home.file = { + "Links/Steam Games".source = config.lib.file.mkOutOfStoreSymlink ( + "${config.home.homeDirectory}/.local/share/Steam/steamapps/common" + ); + }; + }; +} diff --git a/snowfall/modules/home/suites/gaming/default.nix b/snowfall/modules/home/suites/gaming/default.nix index 201e650..b16b0e9 100644 --- a/snowfall/modules/home/suites/gaming/default.nix +++ b/snowfall/modules/home/suites/gaming/default.nix @@ -10,6 +10,7 @@ in { config = mkIf cfg.enable { cxl = { apps = { + steam.enable = true; prismlauncher.enable = true; }; }; |