about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-03-30 17:00:15 +0300
committerGitHub <noreply@github.com>2023-03-30 17:00:15 +0300
commit3947e917cff9fae375de969bd31d12e4be7ca44b (patch)
tree618e5af582d87e8d3796f8cba271942626a2e0b8 /nixos
parent7982e1ab36d44856ef1bd89bd78f9b6889f6c2c0 (diff)
parent48b2f723f58b7b80f4398317108fb17a428b3a9c (diff)
Merge pull request #223760 from K900/nicer-pure-eval-error
nixos/system: disallow system.copySystemConfiguration in pure eval mode
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/activation/top-level.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index 896f8c0a69355..74ab7070fd0fd 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