examples: use mkDefault
for setting system.stateVersion
This makes it easier for users to override the default.
This commit is contained in:
parent
79994d0bd2
commit
f946a7cd9b
@ -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
|
# warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
|
||||||
nix.nixPath = lib.mkForce [];
|
nix.nixPath = lib.mkForce [];
|
||||||
|
|
||||||
system.stateVersion = config.system.nixos.release;
|
system.stateVersion = lib.mkDefault config.system.nixos.release;
|
||||||
};
|
};
|
||||||
}).config.system.build.vm
|
}).config.system.build.vm
|
||||||
EOF
|
EOF
|
||||||
|
@ -45,7 +45,7 @@ rec {
|
|||||||
echo o >/proc/sysrq-trigger
|
echo o >/proc/sysrq-trigger
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.stateVersion = config.system.nixos.release;
|
system.stateVersion = lib.mkDefault config.system.nixos.release;
|
||||||
};
|
};
|
||||||
}).config.system.build.vm;
|
}).config.system.build.vm;
|
||||||
|
|
||||||
|
@ -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.system.build.vm;
|
||||||
|
|
||||||
config = testConfig;
|
config = testConfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user