# nextcloud.nix # from Linux Unplugged { config, pkgs, ... }: { services.nextcloud = { enable = true; hostName = "nextcloud.knossos.arkadi.one"; # Need to manually increment with every major upgrade. package = pkgs.nextcloud30; # Let NixOS install and configure the database automatically. database.createLocally = true; # Let NixOS install and configure Redis caching automatically. configureRedis = true; # Increase the maximum file upload size. maxUploadSize = "16G"; https = true; autoUpdateApps.enable = true; extraAppsEnable = true; extraApps = with config.services.nextcloud.package.packages.apps; { # List of apps we want to install and are already packaged in # https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json inherit calendar contacts notes onlyoffice tasks cookbook; }; settings = { #overwriteprotocol = "https"; trusted_proxies = [ "localhost" "127.0.0.1" "100.82.24.89" ]; #trusted_domains = [ "nextcloud.knossos.arkadi.one" ]; }; config = { dbtype = "pgsql"; adminuser = "admin"; adminpassFile = "/var/lib/secrets/nextcloud-admin-pass"; }; # Suggested by Nextcloud's health check. phpOptions."opcache.interned_strings_buffer" = "16"; }; /* # Nightly database backups. postgresqlBackup = { enable = true; startAt = "*-*-* 01:15:00"; }; */ services.nginx.virtualHosts."nextcloud.knossos.arkadi.one".listen = [ { addr = "127.0.0.1"; port = 8009; } ]; }