mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-22 12:01:27 +00:00
system.stateVersion = lib.mkDefault "$release"
This commit is contained in:
parent
9cd6207238
commit
d099b7bd11
13
nixos-infect
13
nixos-infect
|
@ -37,12 +37,6 @@ genUserdata() {
|
||||||
local HASHED_PASSWORD userdata_infect release
|
local HASHED_PASSWORD userdata_infect release
|
||||||
HASHED_PASSWORD="$(mkpasswd -m sha-512 "$USER_PASS")"
|
HASHED_PASSWORD="$(mkpasswd -m sha-512 "$USER_PASS")"
|
||||||
|
|
||||||
if ! release="$($NIX "${NIX_OPTS[@]}" eval --impure --raw --expr "(builtins.getFlake (builtins.toString ${LOCAL_FLAKE_DIR})).inputs.selfprivacy-nixos-config.inputs.nixpkgs.lib.trivial.release")"
|
|
||||||
then
|
|
||||||
echo "cannot determine NixOS release version"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
userdata_infect=$(cat << EOF
|
userdata_infect=$(cat << EOF
|
||||||
{
|
{
|
||||||
$(genOptionalSsh)
|
$(genOptionalSsh)
|
||||||
|
@ -56,8 +50,7 @@ genUserdata() {
|
||||||
"domain": "$DOMAIN",
|
"domain": "$DOMAIN",
|
||||||
"hashedMasterPassword": "$HASHED_PASSWORD",
|
"hashedMasterPassword": "$HASHED_PASSWORD",
|
||||||
"hostname": "$HOSTNAME",
|
"hostname": "$HOSTNAME",
|
||||||
"username": "$LUSER",
|
"username": "$LUSER"
|
||||||
"stateVersion": "$release"
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
@ -148,11 +141,11 @@ genDeploymentConfiguration() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
${DoNetConf:+"{ lib, ... }: "}{
|
{ lib, ... }: {
|
||||||
# The content below is static and belongs to this deployment only!
|
# The content below is static and belongs to this deployment only!
|
||||||
# Do not copy this configuration file to another NixOS installation!
|
# Do not copy this configuration file to another NixOS installation!
|
||||||
|
|
||||||
# system.stateVersion = "$release";`
|
system.stateVersion = lib.mkDefault "$release";`
|
||||||
`$(if [ "$DoNetConf" == "y" ]; then echo -e "$NL"; genNetworkingConf; fi)
|
`$(if [ "$DoNetConf" == "y" ]; then echo -e "$NL"; genNetworkingConf; fi)
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue