Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextcloud: update a few defaults #369242

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,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'''
Expand Down
15 changes: 9 additions & 6 deletions nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'';
};

Expand Down Expand Up @@ -416,7 +420,6 @@ in {
config = {
dbtype = mkOption {
type = types.enum [ "sqlite" "pgsql" "mysql" ];
default = "sqlite";
description = "Database type.";
};
dbname = mkOption {
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/nextcloud/basic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ runTest (

services.nextcloud = {
enable = true;
config.dbtype = "sqlite";
Ma27 marked this conversation as resolved.
Show resolved Hide resolved
datadir = "/var/lib/nextcloud-data";
autoUpdateApps = {
enable = true;
Expand Down
3 changes: 1 addition & 2 deletions nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';

Expand Down
2 changes: 2 additions & 0 deletions nixos/tests/nextcloud/with-objectstore.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading