flake: pass systems.modules.home into create-systems for NixOS-integrated homes

systems.modules.home was previously only applied to standalone
homeConfigurations. Homes embedded inside nixosConfigurations (evaluated
via create-home-system-modules) received the raw homes attrset without the
systems.modules.home merge, so external HM modules listed there were not
available in nixosConfiguration-hosted homes.

Extract the merge into homes-with-system-modules and pass it to both
create-homes (standalone) and create-systems (NixOS-integrated).
This commit is contained in:
mjallen18
2026-03-25 17:44:05 -05:00
parent 94056dbb28
commit 23e5a04d70

View File

@@ -193,16 +193,16 @@ let
namespace = snowfall-config.namespace or "internal";
custom-flake-options = flake.without-snowfall-options full-flake-options;
alias = full-flake-options.alias or { };
homes = snowfall-lib.home.create-homes (
(full-flake-options.homes or { })
// {
modules =
(full-flake-options.homes.modules or [ ]) ++ (full-flake-options.systems.modules.home or [ ]);
}
);
# Merge systems.modules.home into the homes attrset so it is available
# in both standalone homeConfigurations and NixOS-integrated homes.
homes-with-system-modules = (full-flake-options.homes or { }) // {
modules =
(full-flake-options.homes.modules or [ ]) ++ (full-flake-options.systems.modules.home or [ ]);
};
homes = snowfall-lib.home.create-homes homes-with-system-modules;
systems = snowfall-lib.system.create-systems {
systems = full-flake-options.systems or { };
homes = full-flake-options.homes or { };
homes = homes-with-system-modules;
};
hosts = snowfall-lib.attrs.merge-shallow [
(full-flake-options.systems.hosts or { })