mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-29 14:11:26 +00:00
sp-modules: use jq exit status code
This commit is contained in:
parent
4716b9bf19
commit
ade4dc08b1
|
@ -30,11 +30,11 @@
|
||||||
path = with pkgs; [ coreutils jq ];
|
path = with pkgs; [ coreutils jq ];
|
||||||
script = ''
|
script = ''
|
||||||
install -m 0440 -o nextcloud -g nextcloud -DT \
|
install -m 0440 -o nextcloud -g nextcloud -DT \
|
||||||
<(jq < ${secrets-filepath} -r '.modules.nextcloud.databasePassword') \
|
<(jq -re '.modules.nextcloud.databasePassword' ${secrets-filepath}) \
|
||||||
${db-pass-filepath}
|
${db-pass-filepath}
|
||||||
|
|
||||||
install -m 0440 -o nextcloud -g nextcloud -DT \
|
install -m 0440 -o nextcloud -g nextcloud -DT \
|
||||||
<(jq < ${secrets-filepath} -r '.modules.nextcloud.adminPassword') \
|
<(jq -re '.modules.nextcloud.adminPassword' ${secrets-filepath}) \
|
||||||
${admin-pass-filepath}
|
${admin-pass-filepath}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,7 +61,8 @@ in
|
||||||
path = with pkgs; [ coreutils jq ];
|
path = with pkgs; [ coreutils jq ];
|
||||||
script = ''
|
script = ''
|
||||||
set -o nounset
|
set -o nounset
|
||||||
password=$(jq -r '.databasePassword' ${secrets-filepath})
|
|
||||||
|
password="$(jq -re '.databasePassword' ${secrets-filepath})"
|
||||||
filecontents=$(cat <<- EOF
|
filecontents=$(cat <<- EOF
|
||||||
import Config
|
import Config
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
|
|
|
@ -52,8 +52,8 @@ in
|
||||||
script = ''
|
script = ''
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
account="$(jq -r '.modules.restic.accountId' ${secrets-filepath})"
|
account="$(jq -re '.modules.restic.accountId' ${secrets-filepath})"
|
||||||
key="$(jq -r '.modules.restic.accountKey' ${secrets-filepath})"
|
key="$(jq -re '.modules.restic.accountKey' ${secrets-filepath})"
|
||||||
rclone_conf=$(cat <<- EOF
|
rclone_conf=$(cat <<- EOF
|
||||||
[backblaze]
|
[backblaze]
|
||||||
account = $account
|
account = $account
|
||||||
|
@ -64,7 +64,7 @@ in
|
||||||
<(printf "%s" "$rclone_conf") ${rclone-conf-filepath}
|
<(printf "%s" "$rclone_conf") ${rclone-conf-filepath}
|
||||||
|
|
||||||
install -m 0400 -o restic -g restic -DT \
|
install -m 0400 -o restic -g restic -DT \
|
||||||
<(jq -r '.resticPassword' ${secrets-filepath}) /var/lib/restic/pass
|
<(jq -re '.resticPassword' ${secrets-filepath}) /var/lib/restic/pass
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue