Revert "Module-builtin assertions, disabling assertions and submodule assertions"

This commit is contained in:
Silvan Mosberger
2020-12-18 16:44:37 +01:00
parent fd1cc29974
commit 9e6737710c
16 changed files with 96 additions and 442 deletions
+1 -14
View File
@@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, ... }:
with lib;
@@ -30,18 +30,5 @@ with lib;
};
};
config._module.checks = lib.listToAttrs (lib.imap1 (n: value:
let
name = "_${toString n}";
isWarning = lib.isString value;
result = {
check = if isWarning then false else value.assertion;
type = if isWarning then "warning" else "error";
message = if isWarning then value else value.message;
};
in nameValuePair name result
) (config.assertions ++ config.warnings));
# impl of assertions is in <nixpkgs/nixos/modules/system/activation/top-level.nix>
}