mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
nixos module: evaluate assertions from Home Manager modules
This commit is contained in:
parent
848b8b983e
commit
0898b6b482
1 changed files with 10 additions and 0 deletions
|
@ -44,6 +44,16 @@ in
|
|||
};
|
||||
|
||||
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 (
|
||||
mapAttrs (username: usercfg: {
|
||||
packages = usercfg.home.packages;
|
||||
|
|
Loading…
Reference in a new issue