From 8bbdff45816c657f679cd77c0a0dbca534a85bf3 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sun, 20 Jun 2021 23:29:26 -0500 Subject: [PATCH] nixosTest: Force system.nixos.revision constant nixos tests are blended with other system configurations, hence their settings must be either enforced or defaulted. This particular setting is set via lib.nixosSystem as `system.nixos.revision = final.mkIf (self ? rev) self.rev;` which would mean that without this change no flake generated nixos could be blended with nixos testing. This setting was made previously constant in 169c6b4b1478a3a0c823c99ea39d4082f76a2708 in order to avoid pointless rebuilds of the testing VMs, but was set without enforcing it. --- nixos/lib/build-vms.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix index 064e44f643b..f0a58628c68 100644 --- a/nixos/lib/build-vms.nix +++ b/nixos/lib/build-vms.nix @@ -41,7 +41,7 @@ rec { # The human version (e.g. 21.05-pre) is left as is, because it is useful # for external modules that test with e.g. nixosTest and rely on that # version number. - config.system.nixos.revision = "constant-nixos-revision"; + config.system.nixos.revision = mkForce "constant-nixos-revision"; } { key = "nodes"; _module.args.nodes = nodes; } ] ++ optional minimal ../modules/testing/minimal-kernel.nix;