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 
169c6b4b14 in order to avoid pointless
rebuilds of the testing VMs, but was set without enforcing it.
This commit is contained in:
David Arnold 2021-06-20 23:29:26 -05:00 committed by "David Arnold"
parent ec97be764a
commit 8bbdff4581
No known key found for this signature in database
GPG key ID: AB15A6AF1101390D

View file

@ -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;