nixos/nextcloud: default createLocally to false
This commit is contained in:
@@ -227,7 +227,6 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||||||
|
|
||||||
- [`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally) now uses socket authentication and is no longer compatible with password authentication.
|
- [`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 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.
|
- 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.
|
- `protonmail-bridge` package has been updated to major version 3.
|
||||||
|
|||||||
@@ -17,11 +17,12 @@ and optionally supports
|
|||||||
|
|
||||||
For the database, you can set
|
For the database, you can set
|
||||||
[`services.nextcloud.config.dbtype`](#opt-services.nextcloud.config.dbtype) to
|
[`services.nextcloud.config.dbtype`](#opt-services.nextcloud.config.dbtype) to
|
||||||
either `sqlite` (the default), `mysql`, or `pgsql`. For the last two, by
|
either `sqlite` (the default), `mysql`, or `pgsql`. The simplest is `sqlite`,
|
||||||
default, a local database will be created and nextcloud will connect to it via
|
which will be automatically created and managed by the application. For the
|
||||||
socket; this can be disabled by setting
|
last two, you can easily create a local database by setting
|
||||||
[`services.nextcloud.database.createLocally`](#opt-services.nextcloud.database.createLocally)
|
[`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:
|
A very basic configuration may look like this:
|
||||||
```
|
```
|
||||||
@@ -30,6 +31,7 @@ A very basic configuration may look like this:
|
|||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "nextcloud.tld";
|
hostName = "nextcloud.tld";
|
||||||
|
database.createLocally = true;
|
||||||
config = {
|
config = {
|
||||||
dbtype = "pgsql";
|
dbtype = "pgsql";
|
||||||
adminpassFile = "/path/to/admin-pass-file";
|
adminpassFile = "/path/to/admin-pass-file";
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ in {
|
|||||||
|
|
||||||
createLocally = mkOption {
|
createLocally = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = false;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Create the database and database user locally.
|
Create the database and database user locally.
|
||||||
'';
|
'';
|
||||||
@@ -741,9 +741,8 @@ in {
|
|||||||
{ assertions = [
|
{ assertions = [
|
||||||
{ assertion = cfg.database.createLocally -> cfg.config.dbpassFile == null;
|
{ assertion = cfg.database.createLocally -> cfg.config.dbpassFile == null;
|
||||||
message = ''
|
message = ''
|
||||||
Using `services.nextcloud.database.createLocally` (that now defaults
|
Using `services.nextcloud.database.createLocally` with database
|
||||||
to true) with database password authentication is no longer
|
password authentication is no longer supported.
|
||||||
supported.
|
|
||||||
|
|
||||||
If you use an external database (or want to use password auth for any
|
If you use an external database (or want to use password auth for any
|
||||||
other reason), set `services.nextcloud.database.createLocally` to
|
other reason), set `services.nextcloud.database.createLocally` to
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
datadir = "/var/lib/nextcloud-data";
|
datadir = "/var/lib/nextcloud-data";
|
||||||
hostName = "nextcloud";
|
hostName = "nextcloud";
|
||||||
|
database.createLocally = true;
|
||||||
config = {
|
config = {
|
||||||
# Don't inherit adminuser since "root" is supposed to be the default
|
# Don't inherit adminuser since "root" is supposed to be the default
|
||||||
adminpassFile = "${pkgs.writeText "adminpass" adminpass}"; # Don't try this at home!
|
adminpassFile = "${pkgs.writeText "adminpass" adminpass}"; # Don't try this at home!
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ args@{ pkgs, nextcloudVersion ? 25, ... }:
|
|||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config.adminpassFile = "${pkgs.writeText "adminpass" adminpass}";
|
config.adminpassFile = "${pkgs.writeText "adminpass" adminpass}";
|
||||||
|
database.createLocally = true;
|
||||||
package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
|
package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ in {
|
|||||||
redis = false;
|
redis = false;
|
||||||
memcached = true;
|
memcached = true;
|
||||||
};
|
};
|
||||||
|
database.createLocally = true;
|
||||||
config = {
|
config = {
|
||||||
dbtype = "mysql";
|
dbtype = "mysql";
|
||||||
# Don't inherit adminuser since "root" is supposed to be the default
|
# Don't inherit adminuser since "root" is supposed to be the default
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ in {
|
|||||||
redis = true;
|
redis = true;
|
||||||
memcached = false;
|
memcached = false;
|
||||||
};
|
};
|
||||||
|
database.createLocally = true;
|
||||||
config = {
|
config = {
|
||||||
dbtype = "pgsql";
|
dbtype = "pgsql";
|
||||||
inherit adminuser;
|
inherit adminuser;
|
||||||
|
|||||||
Reference in New Issue
Block a user