32 lines
783 B
Nix
32 lines
783 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: {
|
|
imports = [./traefik.nix ./fail2ban.nix];
|
|
services.nextcloud = {
|
|
enable = true;
|
|
package = pkgs.nextcloud26;
|
|
hostName = "cloud.xenia.me.uk";
|
|
config = {
|
|
adminuser = "xenia";
|
|
adminpassFile = "/secrets/nextcloud_admin.txt";
|
|
};
|
|
};
|
|
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.listen = [
|
|
{
|
|
addr = "localhost";
|
|
port = 8000;
|
|
}
|
|
];
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
routers.nextcloud = {
|
|
rule = "Host(`cloud.xenia.me.uk`)";
|
|
entryPoints = ["http" "https"];
|
|
service = "nextcloud-webinterface";
|
|
tls = {certResolver = "default";};
|
|
};
|
|
services.nextcloud-webinterface.loadBalancer.servers = [{url = "http://localhost:8000";}];
|
|
};
|
|
}
|