mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-26 21:01:31 +00:00
fix nextcloud: fail if secrets are missing
This commit is contained in:
parent
77619456d7
commit
fe44ba6fd8
|
@ -35,12 +35,15 @@
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
path = with pkgs; [ coreutils jq ];
|
path = with pkgs; [ coreutils jq ];
|
||||||
script = ''
|
script = ''
|
||||||
|
databasePassword=$(jq -re '.modules.nextcloud.databasePassword' ${secrets-filepath})
|
||||||
|
adminPassword=$(jq -re '.modules.nextcloud.adminPassword' ${secrets-filepath})
|
||||||
|
|
||||||
install -C -m 0440 -o nextcloud -g nextcloud -DT \
|
install -C -m 0440 -o nextcloud -g nextcloud -DT \
|
||||||
<(jq -re '.modules.nextcloud.databasePassword' ${secrets-filepath}) \
|
<(printf "%s\n" "$databasePassword") \
|
||||||
${db-pass-filepath}
|
${db-pass-filepath}
|
||||||
|
|
||||||
install -C -m 0440 -o nextcloud -g nextcloud -DT \
|
install -C -m 0440 -o nextcloud -g nextcloud -DT \
|
||||||
<(jq -re '.modules.nextcloud.adminPassword' ${secrets-filepath}) \
|
<(printf "%s\n" "$adminPassword") \
|
||||||
${admin-pass-filepath}
|
${admin-pass-filepath}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue