diff options
author | Jan Malakhovski <oxij@oxij.org> | 2019-02-23 18:06:51 +0000 |
---|---|---|
committer | danbst <abcz2.uprola@gmail.com> | 2019-03-08 11:19:18 +0200 |
commit | 570aed4b46916551da969c4daeef0322461ac2fe (patch) | |
tree | 8d97355584bef4d77c1c60ef9966e65c59074bbe /nixos/modules/system/activation | |
parent | e84cf5edad010da2bb9b8ed638b3bd190f3c08c3 (diff) | |
download | nixlib-570aed4b46916551da969c4daeef0322461ac2fe.tar nixlib-570aed4b46916551da969c4daeef0322461ac2fe.tar.gz nixlib-570aed4b46916551da969c4daeef0322461ac2fe.tar.bz2 nixlib-570aed4b46916551da969c4daeef0322461ac2fe.tar.lz nixlib-570aed4b46916551da969c4daeef0322461ac2fe.tar.xz nixlib-570aed4b46916551da969c4daeef0322461ac2fe.tar.zst nixlib-570aed4b46916551da969c4daeef0322461ac2fe.zip |
lib: add `showWarnings`
Diffstat (limited to 'nixos/modules/system/activation')
-rw-r--r-- | nixos/modules/system/activation/top-level.nix | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index a560af5ce96d..5c88d27b6c65 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -130,11 +130,9 @@ let failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions); - showWarnings = res: fold (w: x: builtins.trace "[1;31mwarning: ${w}[0m" x) res config.warnings; - baseSystemAssertWarn = if failedAssertions != [] then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}" - else showWarnings baseSystem; + else showWarnings config.warnings baseSystem; # Replace runtime dependencies system = fold ({ oldDependency, newDependency }: drv: |