From 169c6b4b1478a3a0c823c99ea39d4082f76a2708 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 22 Mar 2021 21:37:54 +0100 Subject: [PATCH] nixosTest: Make system.nixos.revision constant Make the revision metadata constant, in order to avoid needless retesting. 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. --- nixos/lib/build-vms.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix index ebbb0296bef..064e44f643b 100644 --- a/nixos/lib/build-vms.nix +++ b/nixos/lib/build-vms.nix @@ -36,6 +36,13 @@ rec { [ ../modules/virtualisation/qemu-vm.nix ../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs { key = "no-manual"; documentation.nixos.enable = false; } + { key = "no-revision"; + # Make the revision metadata constant, in order to avoid needless retesting. + # 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"; + } { key = "nodes"; _module.args.nodes = nodes; } ] ++ optional minimal ../modules/testing/minimal-kernel.nix; };