'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_',
'overwrite.cli.url' => 'https://cloud.immae.eu',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
+ 'has_rebuilt_cache' => true,
);
'';
}];
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}