mirror of
https://github.com/nix-community/home-manager
synced 2024-11-14 00:47:12 +00:00
nixos module: evaluate assertions from Home Manager modules
(cherry picked from commit 0898b6b482
)
This commit is contained in:
parent
fa19c18343
commit
da31e466a1
1 changed files with 10 additions and 0 deletions
|
@ -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