diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-11 10:19:02 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-11 10:19:02 +0100 |
commit | acaf5190dfc41c6e5528f73017d56aed31b86117 (patch) | |
tree | 6c506bcbce30f36a624610d7ee050e293d8e0d3c /nixops/modules/websites/tools/cloud | |
parent | d06ed384dd59432aec0cf91b92442382c63421d3 (diff) | |
download | Nix-acaf5190dfc41c6e5528f73017d56aed31b86117.tar.gz Nix-acaf5190dfc41c6e5528f73017d56aed31b86117.tar.zst Nix-acaf5190dfc41c6e5528f73017d56aed31b86117.zip |
Move nextcloud configuration to var dir
Fixes https://git.immae.eu/mantisbt/view.php?id=96
Diffstat (limited to 'nixops/modules/websites/tools/cloud')
-rw-r--r-- | nixops/modules/websites/tools/cloud/default.nix | 2 | ||||
-rw-r--r-- | nixops/modules/websites/tools/cloud/nextcloud.nix | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/nixops/modules/websites/tools/cloud/default.nix b/nixops/modules/websites/tools/cloud/default.nix index 241b982..0c6d13d 100644 --- a/nixops/modules/websites/tools/cloud/default.nix +++ b/nixops/modules/websites/tools/cloud/default.nix | |||
@@ -30,7 +30,7 @@ in { | |||
30 | cd ${nextcloud.webRoot} | 30 | cd ${nextcloud.webRoot} |
31 | NEXTCLOUD_CONFIG_DIR="${nextcloud.webRoot}/config" \ | 31 | NEXTCLOUD_CONFIG_DIR="${nextcloud.webRoot}/config" \ |
32 | exec \ | 32 | exec \ |
33 | ${pkgs.php}/bin/php \ | 33 | sudo -u wwwrun ${pkgs.php}/bin/php \ |
34 | -c ${pkgs.php}/etc/php.ini \ | 34 | -c ${pkgs.php}/etc/php.ini \ |
35 | occ $* | 35 | occ $* |
36 | ''; | 36 | ''; |
diff --git a/nixops/modules/websites/tools/cloud/nextcloud.nix b/nixops/modules/websites/tools/cloud/nextcloud.nix index 1e770b8..0185b0f 100644 --- a/nixops/modules/websites/tools/cloud/nextcloud.nix +++ b/nixops/modules/websites/tools/cloud/nextcloud.nix | |||
@@ -146,7 +146,6 @@ let | |||
146 | 'overwrite.cli.url' => 'https://cloud.immae.eu', | 146 | 'overwrite.cli.url' => 'https://cloud.immae.eu', |
147 | 'ldapIgnoreNamingRules' => false, | 147 | 'ldapIgnoreNamingRules' => false, |
148 | 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', | 148 | 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', |
149 | 'config_is_read_only' => true, | ||
150 | ); | 149 | ); |
151 | ''; | 150 | ''; |
152 | config = stdenv.mkDerivation rec { | 151 | config = stdenv.mkDerivation rec { |
@@ -172,7 +171,7 @@ let | |||
172 | mkdir -p $out/ | 171 | mkdir -p $out/ |
173 | cp -R . $out/ | 172 | cp -R . $out/ |
174 | rm -r $out/config | 173 | rm -r $out/config |
175 | ln -sf ${config} $out/config | 174 | ln -sf ../../../../../${varDir}/config $out/config |
176 | ${builtins.concatStringsSep "\n" ( | 175 | ${builtins.concatStringsSep "\n" ( |
177 | lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/apps/${name}") apps | 176 | lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/apps/${name}") apps |
178 | )} | 177 | )} |
@@ -191,6 +190,11 @@ let | |||
191 | text = '' | 190 | text = '' |
192 | install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} | 191 | install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} |
193 | install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions | 192 | install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions |
193 | if [ ! -e ${varDir}/config ]; then | ||
194 | cp -a ${config} ${varDir}/config | ||
195 | chown -R ${apache.user}:${apache.group} ${varDir}/config | ||
196 | chmod -R u+w ${varDir}/config | ||
197 | fi | ||
194 | ''; | 198 | ''; |
195 | }; | 199 | }; |
196 | apache = { | 200 | apache = { |