Configure nextcloud for montalin

This commit is contained in:
Fabian Hauser 2020-10-23 17:35:24 +00:00
parent d5cb513227
commit f9c7e0ed0c
6 changed files with 58 additions and 17 deletions

View file

@ -1,4 +1,6 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }: let
host = "chur.fh2.ch";
in {
imports = [
@ -6,7 +8,13 @@
];
services.nextcloud = {
hostName = "cloud.qo.is";
#hostName = "cloud.qo.is";
hostName = host;
package = pkgs.nextcloud19;
};
services.nginx.virtualHosts."${host}" = {
forceSSL = true;
enableACME = true;
};
}

View file

@ -2,10 +2,15 @@
{
imports = [
../../role/database
];
services.postgresql = {
#enable = true; # Required? Better in role?
package = pkgs.postgresql_12;
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{ name = "nextcloud";
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
}
];
};
services.postgresqlBackup.enable = true; # TODO: Role?
}

View file

@ -18,4 +18,6 @@
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networking.firewall.allowedTCPPorts = [ 80 443 ];
}