From add08fcab07cea0db9b5403861d5ae81ee09f1ee Mon Sep 17 00:00:00 2001 From: John Soo Date: Fri, 17 Dec 2021 13:19:56 -0700 Subject: [PATCH] flakes: Do not verify channels when using flakes. --- modules/system/checks.nix | 8 +++++++- modules/system/flake-overrides.nix | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/system/checks.nix b/modules/system/checks.nix index 4ce6991..bb1ed11 100644 --- a/modules/system/checks.nix +++ b/modules/system/checks.nix @@ -205,6 +205,12 @@ in description = "Whether to run the NIX_PATH validation checks."; }; + system.checks.verifyNixChannels = mkOption { + type = types.bool; + default = true; + description = "Whether to run the nix-channels validation checks."; + }; + system.checks.text = mkOption { internal = true; type = types.lines; @@ -222,7 +228,7 @@ in (mkIf (!config.nix.useDaemon) singleUser) nixStore (mkIf (config.nix.gc.automatic && config.nix.gc.user == null) nixGarbageCollector) - nixChannels + (mkIf cfg.verifyNixChannels nixChannels) nixInstaller (mkIf cfg.verifyNixPath nixPath) ]; diff --git a/modules/system/flake-overrides.nix b/modules/system/flake-overrides.nix index 67a7f79..df3eb16 100644 --- a/modules/system/flake-overrides.nix +++ b/modules/system/flake-overrides.nix @@ -9,6 +9,7 @@ in { config = { system.checks.verifyNixPath = mkDefault false; + system.checks.verifyNixChannels = mkDefault false; system.darwinVersionSuffix = ".${darwin.shortRev or "dirty"}"; system.darwinRevision = mkIf (darwin ? rev) darwin.rev;