From 7508490770ba490ad767d230241822129da70672 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sat, 25 May 2019 09:49:06 +0200 Subject: nixos/test: remove the stateVersion statement from the test-instrumentation We set stateVersion to `mkDefault 18.03` in `nixos/modules/testing/test-instrumentation.nix` and in `modules/installer/cd-dvd/installation-cd-base.nix`. Accessing the stateVersion in the module system from within the tests results in the following error: > The unique option `system.stateVersion' is defined multiple times, in > `nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-base.nix' and > `nixpkgs/nixos/modules/testing/test-instrumentation.nix'. There are other tests that use it as well. Namely the radicale test also verifies behaviour between state versions is as expected. It switches a package default value. Others switched on the state directory default. It seems like having the timesyncd switch as part of every rendered activationScript might cause this weird error. Removing this line seems like a reasonable thing to do since we actually set the default to the very same value in the module system. This line should have been no-op besides the issue that we've two statements setting it in this very specific case. --- nixos/modules/testing/test-instrumentation.nix | 3 --- 1 file changed, 3 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index ed4cfa7805e..1a11d9ce7c2 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -129,9 +129,6 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; }; users.users.root.initialHashedPassword = mkOverride 150 ""; services.xserver.displayManager.job.logToJournal = true; - - # set default stateVersion to avoid warnings during eval - system.stateVersion = mkDefault "18.03"; }; } -- cgit 1.4.1