mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +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 != {}) {
|
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