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";
custom.nextcloud_domain = "nextcloud.vsinerva.fi";
imports = [
../base.nix

View file

@ -1,25 +1,38 @@
{ config, pkgs, ... }:
{
config,
pkgs,
lib,
...
}:
{
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.allowedUDPPorts = [ 443 ];
services = {
nextcloud = {
package = pkgs.nextcloud31;
enable = true;
hostName = "nextcloud.vsinerva.fi";
hostName = config.custom.nextcloud_domain;
autoUpdateApps.enable = true;
https = true;
maxUploadSize = "10G";
maxUploadSize = "512M"; # Default
config = {
adminpassFile = "/var/lib/nextcloud/adminpass";
};
settings = {
overwriteprotocol = "https";
maintenancce_window_start = 1;
opcache.interned_strings_buffer = 32;
default_phone_region = "FI";
maintenance_window_start = 1;
};
phpOptions = {
"opcache.interned_strings_buffer" = 32;
};
};
@ -37,4 +50,5 @@
};
};
};
};
}