Unverified Commit fa06a3b6 authored by Ryan Lahfa's avatar Ryan Lahfa Committed by GitHub
Browse files

Merge pull request #230888 from Misterio77/nextcloud-createlocally-optin

nixos/nextcloud: default createLocally to false
parents 25f3323d f9f76529
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -243,7 +243,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.
  - 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
Original line number Diff line number Diff line
@@ -17,11 +17,12 @@ and optionally supports

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:
```
@@ -30,6 +31,7 @@ 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
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ in {

      createLocally = mkOption {
        type = types.bool;
        default = true;
        default = false;
        description = lib.mdDoc ''
          Create the database and database user locally.
        '';
@@ -754,9 +754,8 @@ in {
    { 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 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ in {
        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 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ args@{ pkgs, nextcloudVersion ? 25, ... }:
    services.nextcloud = {
      enable = true;
      config.adminpassFile = "${pkgs.writeText "adminpass" adminpass}";
      database.createLocally = true;
      package = pkgs.${"nextcloud" + (toString nextcloudVersion)};
    };
  };
Loading