nixos/nextcloud: default createLocally to false

Changed files
+13 -9
nixos
-1
nixos/doc/manual/release-notes/rl-2305.section.md
···
- [`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally) now uses socket authentication and is no longer compatible with password authentication.
- If you want the module to manage the database for you, unset [`services.nextcloud.config.dbpassFile`](#opt-services.nextcloud.config.dbpassFile) (and [`services.nextcloud.config.dbhost`](#opt-services.nextcloud.config.dbhost), if it's set).
-
- If your database is external, simply set [`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally) to `false`.
- If you want to use password authentication **and** create the database locally, you will have to use [`services.mysql`](#opt-services.mysql.enable) to set it up.
- `protonmail-bridge` package has been updated to major version 3.
+6 -4
nixos/modules/services/web-apps/nextcloud.md
···
For the database, you can set
[`services.nextcloud.config.dbtype`](#opt-services.nextcloud.config.dbtype) to
-
either `sqlite` (the default), `mysql`, or `pgsql`. For the last two, by
-
default, a local database will be created and nextcloud will connect to it via
-
socket; this can be disabled by setting
+
either `sqlite` (the default), `mysql`, or `pgsql`. The simplest is `sqlite`,
+
which will be automatically created and managed by the application. For the
+
last two, you can easily create a local database by setting
[`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally)
-
to `false`.
+
to `true`, Nextcloud will automatically be configured to connect to it through
+
socket.
A very basic configuration may look like this:
```
···
services.nextcloud = {
enable = true;
hostName = "nextcloud.tld";
+
database.createLocally = true;
config = {
dbtype = "pgsql";
adminpassFile = "/path/to/admin-pass-file";
+3 -4
nixos/modules/services/web-apps/nextcloud.nix
···
createLocally = mkOption {
type = types.bool;
-
default = true;
+
default = false;
description = lib.mdDoc ''
Create the database and database user locally.
'';
···
{ assertions = [
{ assertion = cfg.database.createLocally -> cfg.config.dbpassFile == null;
message = ''
-
Using `services.nextcloud.database.createLocally` (that now defaults
-
to true) with database password authentication is no longer
-
supported.
+
Using `services.nextcloud.database.createLocally` with database
+
password authentication is no longer supported.
If you use an external database (or want to use password auth for any
other reason), set `services.nextcloud.database.createLocally` to
+1
nixos/tests/nextcloud/basic.nix
···
enable = true;
datadir = "/var/lib/nextcloud-data";
hostName = "nextcloud";
+
database.createLocally = true;
config = {
# Don't inherit adminuser since "root" is supposed to be the default
adminpassFile = "${pkgs.writeText "adminpass" adminpass}"; # Don't try this at home!
+1
nixos/tests/nextcloud/openssl-sse.nix
···
services.nextcloud = {
enable = true;
config.adminpassFile = "${pkgs.writeText "adminpass" adminpass}";
+
database.createLocally = true;
package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
};
};
+1
nixos/tests/nextcloud/with-mysql-and-memcached.nix
···
redis = false;
memcached = true;
};
+
database.createLocally = true;
config = {
dbtype = "mysql";
# Don't inherit adminuser since "root" is supposed to be the default
+1
nixos/tests/nextcloud/with-postgresql-and-redis.nix
···
redis = true;
memcached = false;
};
+
database.createLocally = true;
config = {
dbtype = "pgsql";
inherit adminuser;