examples: use mkDefault for setting system.stateVersion

This makes it easier for users to override the default.
This commit is contained in:
Erik Arvstedt 2022-07-05 12:19:01 +02:00
parent 79994d0bd2
commit f946a7cd9b
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ nix-build --out-link $tmpDir/vm - <<'EOF'
# warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
nix.nixPath = lib.mkForce [];
system.stateVersion = config.system.nixos.release;
system.stateVersion = lib.mkDefault config.system.nixos.release;
};
}).config.system.build.vm
EOF

View File

@ -45,7 +45,7 @@ rec {
echo o >/proc/sysrq-trigger
'';
system.stateVersion = config.system.nixos.release;
system.stateVersion = lib.mkDefault config.system.nixos.release;
};
}).config.system.build.vm;

View File

@ -79,7 +79,7 @@ name: testConfig:
''))
];
system.stateVersion = config.system.nixos.release;
system.stateVersion = lib.mkDefault config.system.nixos.release;
})).config.system.build.vm;
config = testConfig;