nixos-config/config/domain-config/fudo.org/nextcloud.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

2023-10-14 16:15:26 -07:00
{ nextcloudPackage, nextcloudHost, nextcloudHostname, ... }:
{ config, lib, pkgs, ... }:
with lib;
let
hostname = config.instance.hostname;
host = config.fudo.hosts."${hostname}";
isNextcloud = hostname == nextcloudHost;
port = config.services.nextcloudContainer.port;
in {
config = mkIf isNextcloud {
services = {
nextcloudContainer = {
enable = true;
hostname = nextcloudHostname;
package = nextcloudPackage;
extra-apps =
with config.services.nextcloudContainer.package.packages.apps; {
inherit news contacts calendar tasks maps memories mail bookmarks
files_markdown notes unsplash user_saml;
};
timezone = "America/Winnipeg";
};
nginx = {
enable = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts."${nextcloudHostname}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
proxyWebsockets = true;
};
2023-11-13 10:59:41 -08:00
extraConfig = ''
client_body_buffer_size 1024m;
'';
2023-10-14 16:15:26 -07:00
};
};
};
};
}