aboutsummaryrefslogtreecommitdiff
path: root/snowfall/modules/home
diff options
context:
space:
mode:
Diffstat (limited to 'snowfall/modules/home')
-rw-r--r--snowfall/modules/home/apps/steam/default.nix30
-rw-r--r--snowfall/modules/home/suites/gaming/default.nix1
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;
};
};