From 3a1461cf44102e6cd8cdee5e0f1ff1d7992894ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 5 May 2019 23:12:17 +0200 Subject: Upgrade nextcloud to 16.0 --- nixops/modules/websites/tools/cloud/default.nix | 15 +++++++++++---- .../tools/cloud/nextcloud-config/mimetypealiases.json | 4 ---- .../tools/cloud/nextcloud-config/mimetypemapping.json | 4 ---- 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json delete mode 100644 nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json (limited to 'nixops/modules/websites/tools/cloud') diff --git a/nixops/modules/websites/tools/cloud/default.nix b/nixops/modules/websites/tools/cloud/default.nix index f7d25cf..a7fcd61 100644 --- a/nixops/modules/websites/tools/cloud/default.nix +++ b/nixops/modules/websites/tools/cloud/default.nix @@ -94,7 +94,7 @@ in { 'passwordsalt' => '${env.password_salt}', 'debug' => false, 'dbtype' => 'pgsql', - 'version' => '15.0.4.0', + 'version' => '16.0.0.9', 'dbname' => '${env.postgresql.database}', 'dbhost' => '${env.postgresql.socket}', 'dbtableprefix' => 'oc_', @@ -135,6 +135,7 @@ in { 'overwrite.cli.url' => 'https://cloud.immae.eu', 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', + 'has_rebuilt_cache' => true, ); ''; }]; @@ -151,14 +152,20 @@ in { in [ occ ]; system.activationScripts.nextcloud = { - deps = [ ]; - text = '' + deps = [ "secrets" ]; + text = let + confs = lib.attrsets.mapAttrs (n: v: pkgs.writeText "${n}.json" (builtins.toJSON v)) nextcloud.otherConfig; + in + '' install -m 0755 -o wwwrun -g wwwrun -d ${varDir} install -m 0750 -o wwwrun -g wwwrun -d ${varDir}/phpSessions - install -D -m 0644 -o wwwrun -g wwwrun ${./nextcloud-config}/* -t ${varDir}/config + ${builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: + "install -D -m 0644 -o wwwrun -g wwwrun -T ${v} ${varDir}/config/${n}.json" + ) confs)} install -D -m 0600 -o wwwrun -g wwwrun -T /var/secrets/webapps/tools-nextcloud ${varDir}/config/config.php ''; }; + # FIXME: add a warning when config.php changes system.extraSystemBuilderCmds = '' mkdir -p $out/webapps ln -s ${nextcloud} $out/webapps/${webappName} diff --git a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json b/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json deleted file mode 100644 index 3806e53..0000000 --- a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "application/gpx+xml": "gpx", - "x-application/kdbx": "kdbx" -} diff --git a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json b/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json deleted file mode 100644 index 2db4691..0000000 --- a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "gpx": ["application/gpx+xml"], - "kdbx": ["x-application/kdbx"] -} -- cgit v1.2.3