Clean up Nextcloud config

This commit is contained in:
Vili Sinervä 2025-04-01 00:39:43 +03:00
parent c544ae4771
commit 8bde1eb549
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
2 changed files with 44 additions and 29 deletions

View file

@ -1,6 +1,7 @@
{ ... }: { ... }:
{ {
networking.hostName = "nextcloud"; networking.hostName = "nextcloud";
custom.nextcloud_domain = "nextcloud.vsinerva.fi";
imports = [ imports = [
../base.nix ../base.nix

View file

@ -1,25 +1,38 @@
{ config, pkgs, ... }: {
config,
pkgs,
lib,
...
}:
{ {
imports = [ ./cert-store-client.nix ]; imports = [ ./cert-store-client.nix ];
options.custom.nextcloud_domain = lib.mkOption {
type = lib.types.str;
description = "Domain used by Nextcloud";
};
config = {
networking.firewall.allowedTCPPorts = [ 443 ]; networking.firewall.allowedTCPPorts = [ 443 ];
networking.firewall.allowedUDPPorts = [ 443 ];
services = { services = {
nextcloud = { nextcloud = {
package = pkgs.nextcloud31; package = pkgs.nextcloud31;
enable = true; enable = true;
hostName = "nextcloud.vsinerva.fi"; hostName = config.custom.nextcloud_domain;
autoUpdateApps.enable = true; autoUpdateApps.enable = true;
https = true; https = true;
maxUploadSize = "10G"; maxUploadSize = "512M"; # Default
config = { config = {
adminpassFile = "/var/lib/nextcloud/adminpass"; adminpassFile = "/var/lib/nextcloud/adminpass";
}; };
settings = { settings = {
overwriteprotocol = "https"; overwriteprotocol = "https";
maintenancce_window_start = 1; default_phone_region = "FI";
opcache.interned_strings_buffer = 32; maintenance_window_start = 1;
};
phpOptions = {
"opcache.interned_strings_buffer" = 32;
}; };
}; };
@ -37,4 +50,5 @@
}; };
}; };
}; };
};
} }