Unverified Commit fd92a488 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

nextcloud: update a few defaults (#369242)

parents a6e60687 b95a9171
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -115,6 +115,15 @@

- `ps3-disc-dumper` was updated to 4.2.5, which removed the CLI project and now exclusively offers the GUI

- [](#opt-services.nextcloud.config.dbtype) is unset by default, the previous default was `sqlite`.
  This was done because `sqlite` is not a reasonable default since it's
  [not recommended by upstream](https://docs.nextcloud.com/server/30/admin_manual/installation/system_requirements.html)
  and thus doesn't qualify as default.

- Nextcloud's default FPM pool settings have been increased according to upstream recommentations. It's advised
  to review the new defaults and description of
  [](#opt-services.nextcloud.poolSettings).

- `asusd` has been upgraded to version 6 which supports multiple aura devices. To account for this, the single `auraConfig` configuration option has been replaced with `auraConfigs` which is an attribute set of config options per each device. The config files may also be now specified as either source files or text strings; to account for this you will need to specify that `text` is used for your existing configs, e.g.:
  ```diff
  -services.asusd.asusdConfig = '''file contents'''
+9 −6
Original line number Diff line number Diff line
@@ -374,14 +374,18 @@ in {
      type = with types; attrsOf (oneOf [ str int bool ]);
      default = {
        "pm" = "dynamic";
        "pm.max_children" = "32";
        "pm.start_servers" = "2";
        "pm.min_spare_servers" = "2";
        "pm.max_spare_servers" = "4";
        "pm.max_children" = "120";
        "pm.start_servers" = "12";
        "pm.min_spare_servers" = "6";
        "pm.max_spare_servers" = "18";
        "pm.max_requests" = "500";
      };
      description = ''
        Options for nextcloud's PHP pool. See the documentation on `php-fpm.conf` for details on configuration directives.
        Options for nextcloud's PHP pool. See the documentation on `php-fpm.conf` for details on
        configuration directives. The above are recommended for a server with 4GiB of RAM.

        It's advisable to read the [section about PHPFPM tuning in the upstream manual](https://docs.nextcloud.com/server/30/admin_manual/installation/server_tuning.html#tune-php-fpm)
        and consider customizing the values.
      '';
    };

@@ -416,7 +420,6 @@ in {
    config = {
      dbtype = mkOption {
        type = types.enum [ "sqlite" "pgsql" "mysql" ];
        default = "sqlite";
        description = "Database type.";
      };
      dbname = mkOption {
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ runTest (

          services.nextcloud = {
            enable = true;
            config.dbtype = "sqlite";
            datadir = "/var/lib/nextcloud-data";
            autoUpdateApps = {
              enable = true;
+1 −2
Original line number Diff line number Diff line
@@ -69,14 +69,13 @@ runTest (

          services.postgresql = {
            enable = true;
            package = pkgs.postgresql_14;
          };
          systemd.services.postgresql.postStart = pkgs.lib.mkAfter ''
            password=$(cat ${config.services.nextcloud.config.dbpassFile})
            ${config.services.postgresql.package}/bin/psql <<EOF
              CREATE ROLE ${adminuser} WITH LOGIN PASSWORD '$password' CREATEDB;
              CREATE DATABASE nextcloud;
              GRANT ALL PRIVILEGES ON DATABASE nextcloud TO ${adminuser};
              ALTER DATABASE nextcloud OWNER to ${adminuser};
            EOF
          '';

+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ runTest (
          networking.firewall.allowedTCPPorts = [ 9000 ];
          environment.systemPackages = [ pkgs.minio-client ];

          services.nextcloud.config.dbtype = "sqlite";

          services.nextcloud.config.objectstore.s3 = {
            enable = true;
            bucket = "nextcloud";