From 0898b6b48277de277a9ce0a06602cce1a9881fcb Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 28 Feb 2019 01:52:48 +0100 Subject: [PATCH] nixos module: evaluate assertions from Home Manager modules --- nixos/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/default.nix b/nixos/default.nix index 2134175bc..5328e5781 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -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;