diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-09-02 00:17:26 +0200 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-11-30 23:51:22 +0100 |
commit | 9523df7eb600e7fc2a88bc5227d9dfe12055a9bd (patch) | |
tree | 64fb87e447b515e1b7ebbce0eeb32f3942d47947 /nixos/modules/system/activation/top-level.nix | |
parent | df5ba82f74df75e96390995472f3e1e5179da21c (diff) | |
download | nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.tar nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.tar.gz nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.tar.bz2 nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.tar.lz nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.tar.xz nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.tar.zst nixpkgs-9523df7eb600e7fc2a88bc5227d9dfe12055a9bd.zip |
nixos/assertions: Use module-builtin assertion implementation
Diffstat (limited to 'nixos/modules/system/activation/top-level.nix')
-rw-r--r-- | nixos/modules/system/activation/top-level.nix | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 03d7e749323..17b62ad9569 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -117,18 +117,10 @@ let perl = "${pkgs.perl}/bin/perl " + (concatMapStringsSep " " (lib: "-I${lib}/${pkgs.perl.libPrefix}") (with pkgs.perlPackages; [ FileSlurp NetDBus XMLParser XMLTwig ])); }; - # Handle assertions and warnings - - failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions); - - baseSystemAssertWarn = if failedAssertions != [] - then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}" - else showWarnings config.warnings baseSystem; - # Replace runtime dependencies system = fold ({ oldDependency, newDependency }: drv: pkgs.replaceDependency { inherit oldDependency newDependency drv; } - ) baseSystemAssertWarn config.system.replaceRuntimeDependencies; + ) baseSystem config.system.replaceRuntimeDependencies; in |