2023-05-16 17:22:11 +01:00
|
|
|
{ pkgs, config, ... }:
|
2023-05-16 16:59:22 +01:00
|
|
|
{
|
|
|
|
imports = [ ./traefik.nix ./fail2ban.nix ];
|
|
|
|
services.nextcloud = {
|
|
|
|
enable = true;
|
2023-05-16 17:22:11 +01:00
|
|
|
package = pkgs.nextcloud26;
|
2023-05-16 16:59:22 +01:00
|
|
|
hostName = "cloud.xenia.me.uk";
|
2023-05-16 17:22:11 +01:00
|
|
|
config = {
|
|
|
|
adminuser = "xenia";
|
2023-05-16 17:33:42 +01:00
|
|
|
adminpassFile = "/secrets/nextcloud_admin.txt";
|
2023-05-16 17:22:11 +01:00
|
|
|
};
|
2023-05-16 16:59:22 +01:00
|
|
|
};
|
2023-05-16 17:22:11 +01:00
|
|
|
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.listen = [{ addr = "localhost"; port = 8000; }];
|
2023-05-16 16:59:22 +01:00
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
|
|
routers.nextcloud = {
|
|
|
|
rule = "Host(`cloud.xenia.me.uk`)";
|
|
|
|
service = "nextcloud-webinterface";
|
|
|
|
tls = { certResolver = "default"; };
|
|
|
|
};
|
2023-05-16 17:22:11 +01:00
|
|
|
services.nextcloud-webinterface.loadBalancer.servers = [{ url = "http://localhost:8000"; }];
|
2023-05-16 16:59:22 +01:00
|
|
|
};
|
|
|
|
}
|