From 48b2f723f58b7b80f4398317108fb17a428b3a9c Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 29 Mar 2023 17:49:30 +0300 Subject: [PATCH] nixos/system: disallow system.copySystemConfiguration in pure eval mode This is already broken, so let's give it a better error message. --- nixos/modules/system/activation/top-level.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 896f8c0a6935..74ab7070fd0f 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -338,6 +338,12 @@ in config = { + assertions = [ + { + assertion = config.system.copySystemConfiguration -> !lib.inPureEvalMode; + message = "system.copySystemConfiguration is not supported with flakes"; + } + ]; system.extraSystemBuilderCmds = optionalString