nixos module: evaluate assertions from Home Manager modules
(cherry picked from commit 0898b6b482
)
This commit is contained in:
parent
fa19c18343
commit
da31e466a1
|
@ -44,6 +44,16 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.users != {}) {
|
config = mkIf (cfg.users != {}) {
|
||||||
|
assertions =
|
||||||
|
flatten (flip mapAttrsToList cfg.users (user: config:
|
||||||
|
flip map config.assertions (assertion:
|
||||||
|
{
|
||||||
|
inherit (assertion) assertion;
|
||||||
|
message = "${user} profile: ${assertion.message}";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
users.users = mkIf cfg.useUserPackages (
|
users.users = mkIf cfg.useUserPackages (
|
||||||
mapAttrs (username: usercfg: {
|
mapAttrs (username: usercfg: {
|
||||||
packages = usercfg.home.packages;
|
packages = usercfg.home.packages;
|
||||||
|
|
Loading…
Reference in a new issue