From c13316eacefe63893289d19c198bfbd6b77ddaa2 Mon Sep 17 00:00:00 2001 From: Jake Hamilton Date: Sun, 25 Feb 2024 04:03:02 -0800 Subject: [PATCH] fix: install shared modules, strip homes from config --- snowfall-lib/flake/default.nix | 1 + snowfall-lib/home/default.nix | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/snowfall-lib/flake/default.nix b/snowfall-lib/flake/default.nix index a0904ec..391172b 100644 --- a/snowfall-lib/flake/default.nix +++ b/snowfall-lib/flake/default.nix @@ -65,6 +65,7 @@ in rec { "outputsBuilder" "packagesPrefix" "hosts" + "homes" "channels-config" "templates" "package-namespace" diff --git a/snowfall-lib/home/default.nix b/snowfall-lib/home/default.nix index c654919..23a9957 100644 --- a/snowfall-lib/home/default.nix +++ b/snowfall-lib/home/default.nix @@ -231,7 +231,11 @@ in { src = "${user-modules-root}/home"; }; - shared-modules = + shared-modules = builtins.map (module: { + config.home-manager.sharedModules = [module]; + }) (users.modules or []); + + shared-user-modules = mapAttrsToList (module-path: module: { _file = "${user-modules-root}/home/${module-path}/default.nix"; @@ -361,6 +365,7 @@ in { snowfall-user-home-module ] ++ shared-modules + ++ shared-user-modules ++ system-modules; }; }