nixos/tests: prevent stateVersion warnings in eval
... introduced by 1f0b6922d3c
continuation of 88fa50c2f2bbc472fe7169eac8f2a1b2312ef03b
commitdd73ab00923a4b39fe7b3fbce31cadfd38d8177b
authorUli Baum <xeji@cat3.de>
dateTue 15 May 2018, 00:18 (9 years ago)
parent4e7d08c
nixos/modules/installer/cd-dvd/installation-cd-base.nix+2
@@ -31,4 +31,6 @@ with lib;
3131
3232 # Allow the user to log in as root without a password.
3333 users.extraUsers.root.initialHashedPassword = "";
34+
35+ system.nixos.stateVersion = mkDefault "18.03";
3436}
nixos/modules/installer/virtualbox-demo.nix+1
@@ -21,4 +21,5 @@ with lib;
2121 services.xserver.videoDrivers = mkOverride 40 [ "virtualbox" "vmware" "cirrus" "vesa" "modesetting" ];
2222
2323 powerManagement.enable = false;
24+ system.nixos.stateVersion = mkDefault "18.03";
2425}
nixos/release.nix+1
@@ -198,6 +198,7 @@ in rec {
198198 modules = singleton ({ config, pkgs, ... }:
199199 { fileSystems."/".device = mkDefault "/dev/sda1";
200200 boot.loader.grub.device = mkDefault "/dev/sda";
201+ system.nixos.stateVersion = mkDefault "18.03";
201202 });
202203 }).config.system.build.toplevel;
203204 preferLocalBuild = true;
nixos/tests/containers-imperative.nix+3−1
@@ -17,7 +17,9 @@ import ./make-test.nix ({ pkgs, ...} : {
1717 emptyContainer = import ../lib/eval-config.nix {
1818 inherit (config.nixpkgs.localSystem) system;
1919 modules = lib.singleton {
20− containers.foo.config = {};
20+ containers.foo.config = {
21+ system.nixos.stateVersion = "18.03";
22+ };
2123 };
2224 };
2325 in [ pkgs.stdenv emptyContainer.config.containers.foo.path pkgs.libxslt ];
nixos/tests/containers-ipv4.nix+1
@@ -21,6 +21,7 @@ import ./make-test.nix ({ pkgs, ...} : {
2121 services.httpd.adminAddr = "foo@example.org";
2222 networking.firewall.allowedTCPPorts = [ 80 ];
2323 networking.firewall.allowPing = true;
24+ system.nixos.stateVersion = "18.03";
2425 };
2526 };
2627