mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-22 03:51:27 +00:00
feat: Initialize server with binds and resizable volume activated
This commit is contained in:
parent
be3a8485f6
commit
eca6780983
31
nixos-infect
31
nixos-infect
|
@ -10,7 +10,7 @@ makeConf() {
|
|||
if [[ $PASSWORD == null ]]; then
|
||||
export PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode)
|
||||
fi
|
||||
|
||||
|
||||
export ESCAPED_PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode | jq -Rs .)
|
||||
export HASHED_PASSWORD=$( mkpasswd -m sha-512 "$PASSWORD" )
|
||||
|
||||
|
@ -31,7 +31,8 @@ makeConf() {
|
|||
cat > /etc/nixos/userdata/userdata.json << EOF
|
||||
{
|
||||
"api": {
|
||||
"token": "$API_TOKEN"
|
||||
"token": "$API_TOKEN",
|
||||
"skippedMigrations": ["migrate_to_selfprivacy_channel", "mount_volume"]
|
||||
},
|
||||
"backblaze": {
|
||||
"accountId": "$BACKBLAZE_KEY_ID",
|
||||
|
@ -39,7 +40,8 @@ makeConf() {
|
|||
"bucket": "$BACKBLAZE_BUCKET_NAME"
|
||||
},
|
||||
"bitwarden": {
|
||||
"enable": true
|
||||
"enable": true,
|
||||
"location": "sdb"
|
||||
},
|
||||
"cloudflare": {
|
||||
"apiKey": "$CF_TOKEN"
|
||||
|
@ -51,23 +53,34 @@ makeConf() {
|
|||
"nextcloud": {
|
||||
"enable": true,
|
||||
"adminPassword": $ESCAPED_PASSWORD,
|
||||
"databasePassword": $ESCAPED_PASSWORD
|
||||
"databasePassword": $ESCAPED_PASSWORD,
|
||||
"location": "sdb"
|
||||
},
|
||||
"gitea": {
|
||||
"enable": true
|
||||
"enable": true,
|
||||
"location": "sdb"
|
||||
},
|
||||
"jitsi": {
|
||||
"enable": true
|
||||
},
|
||||
"ocserv": {
|
||||
"enable": true
|
||||
"enable": false
|
||||
},
|
||||
"pleroma": {
|
||||
"enable": true
|
||||
"enable": false,
|
||||
"location": "sdb"
|
||||
},
|
||||
"timezone": "Europe/Uzhgorod",
|
||||
"resticPassword": $ESCAPED_PASSWORD,
|
||||
"username": "$LUSER"
|
||||
"username": "$LUSER",
|
||||
"volumes": [
|
||||
{
|
||||
"device": "/dev/sdb",
|
||||
"mountPoint": "/volumes/sdb",
|
||||
"fsType": "ext4"
|
||||
}
|
||||
],
|
||||
"useBinds": true
|
||||
}
|
||||
EOF
|
||||
chmod 0600 /etc/nixos/userdata/userdata.json
|
||||
|
@ -353,4 +366,4 @@ removeSwap
|
|||
|
||||
if [[ -z "$NO_REBOOT" ]]; then
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue