mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-26 12:51:30 +00:00
nextcloud: write passwords using install
This commit is contained in:
parent
e814157437
commit
a224731dcf
|
@ -19,14 +19,15 @@
|
||||||
lib.mkIf sp.modules.nextcloud.enable
|
lib.mkIf sp.modules.nextcloud.enable
|
||||||
{
|
{
|
||||||
system.activationScripts.nextcloudSecrets = ''
|
system.activationScripts.nextcloudSecrets = ''
|
||||||
mkdir -p /var/lib/nextcloud
|
install -m 0440 -o nextcloud -g nextcloud -DT \
|
||||||
${pkgs.jq}/bin/jq < ${secrets-filepath} -r '.modules.nextcloud.databasePassword' > ${db-pass-filepath}
|
<(${pkgs.jq}/bin/jq < \
|
||||||
chmod 0440 ${db-pass-filepath}
|
${secrets-filepath} -r '.modules.nextcloud.databasePassword') \
|
||||||
chown nextcloud:nextcloud ${db-pass-filepath}
|
${db-pass-filepath}
|
||||||
|
|
||||||
${pkgs.jq}/bin/jq < ${secrets-filepath} -r '.modules.nextcloud.adminPassword' > ${admin-pass-filepath}
|
install -m 0440 -o nextcloud -g nextcloud -DT \
|
||||||
chmod 0440 ${admin-pass-filepath}
|
<(${pkgs.jq}/bin/jq < \
|
||||||
chown nextcloud:nextcloud ${admin-pass-filepath}
|
${secrets-filepath} -r '.modules.nextcloud.adminPassword') \
|
||||||
|
${admin-pass-filepath}
|
||||||
'';
|
'';
|
||||||
fileSystems = lib.mkIf sp.useBinds {
|
fileSystems = lib.mkIf sp.useBinds {
|
||||||
"/var/lib/nextcloud" = {
|
"/var/lib/nextcloud" = {
|
||||||
|
|
Loading…
Reference in a new issue