diff --git a/server/nextcloud.nix b/server/nextcloud.nix new file mode 100644 index 00000000..05b83530 --- /dev/null +++ b/server/nextcloud.nix @@ -0,0 +1,17 @@ +{ ... }: +{ + imports = [ ./traefik.nix ./fail2ban.nix ]; + services.nextcloud = { + enable = true; + hostName = "cloud.xenia.me.uk"; + logType = "systemd"; + }; + services.traefik.dynamicConfigOptions.http = { + routers.nextcloud = { + rule = "Host(`cloud.xenia.me.uk`)"; + service = "nextcloud-webinterface"; + tls = { certResolver = "default"; }; + }; + services.nextcloud-webinterface.loadBalancer.servers = [{ url = "http://localhost:3000"; }]; + }; +}