mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-10 13:33:11 +00:00
Moved hash generation engine to the backend
This commit is contained in:
parent
04ea9b0f24
commit
5e7fd4869b
|
@ -5,6 +5,7 @@
|
|||
set -e -o pipefail
|
||||
|
||||
makeConf() {
|
||||
export HASHED_PASSWORD=$( mkpasswd -m sha-512 "$PASSWORD" )
|
||||
# Skip everything if main config already present
|
||||
[[ -e /etc/nixos/configuration.nix ]] && return 0
|
||||
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not
|
||||
|
@ -118,7 +119,7 @@ makeConf() {
|
|||
users.users = {
|
||||
"$LUSER" = {
|
||||
isNormalUser = true;
|
||||
hashedPassword = "\$6\$$SALT\$$HASHED_PASSWORD";
|
||||
hashedPassword = "$HASHED_PASSWORD";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1319,7 +1320,7 @@ infect() {
|
|||
[ "$PROVIDER" = "digitalocean" ] && doNetConf=y # digitalocean requires detailed network config to be generated
|
||||
|
||||
apt update
|
||||
apt install -y git
|
||||
apt install -y git whois
|
||||
prepareEnv
|
||||
makeSwap # smallest (512MB) droplet needs extra memory!
|
||||
checkEnv
|
||||
|
|
Loading…
Reference in a new issue