mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-25 13:01:28 +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
|
||||
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
|
||||
{
|
||||
$(genOptionalSsh)
|
||||
|
@ -56,8 +50,7 @@ genUserdata() {
|
|||
"domain": "$DOMAIN",
|
||||
"hashedMasterPassword": "$HASHED_PASSWORD",
|
||||
"hostname": "$HOSTNAME",
|
||||
"username": "$LUSER",
|
||||
"stateVersion": "$release"
|
||||
"username": "$LUSER"
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
@ -148,11 +141,11 @@ genDeploymentConfiguration() {
|
|||
fi
|
||||
|
||||
cat << EOF
|
||||
${DoNetConf:+"{ lib, ... }: "}{
|
||||
{ lib, ... }: {
|
||||
# The content below is static and belongs to this deployment only!
|
||||
# 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)
|
||||
}
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue