about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2023-05-14 20:13:12 +0100
committerGitHub <noreply@github.com>2023-05-14 20:13:12 +0100
commit3007746b3f5bfcb49e102b517bca891822a41b31 (patch)
tree8ac1dd84426c8307485536a8521638bb5f14914b /nixos
parentb5a6d5bf65b61f4ce6d815134a3894e6ccef8efd (diff)
parentc51fe112cc73f87f282de24aa0fd929e72bb6ed0 (diff)
Merge pull request #231473 from B4dM4n/eval-config-pass-system
treewide: pass system argument to eval-config.nix
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/nixos-containers.nix4
-rw-r--r--nixos/tests/containers-imperative.nix4
2 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix
index d54e2ed3f3ae1..c3949564d4bde 100644
--- a/nixos/modules/virtualisation/nixos-containers.nix
+++ b/nixos/modules/virtualisation/nixos-containers.nix
@@ -515,6 +515,10 @@ in
                     in [ extraConfig ] ++ (map (x: x.value) defs);
                   prefix = [ "containers" name ];
                   inherit (config) specialArgs;
+
+                  # The system is inherited from the host above.
+                  # Set it to null, to remove the "legacy" entrypoint's non-hermetic default.
+                  system = null;
                 }).config;
               };
             };
diff --git a/nixos/tests/containers-imperative.nix b/nixos/tests/containers-imperative.nix
index 3007efaf88710..22b664a90e170 100644
--- a/nixos/tests/containers-imperative.nix
+++ b/nixos/tests/containers-imperative.nix
@@ -25,6 +25,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
               system.stateVersion = "18.03";
             };
           };
+
+          # The system is inherited from the host above.
+          # Set it to null, to remove the "legacy" entrypoint's non-hermetic default.
+          system = null;
         };
       in with pkgs; [
         stdenv stdenvNoCC emptyContainer.config.containers.foo.path