From aad49126e56aa9bb1a05f3e2908f625e24582d1a Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Tue, 16 Sep 2025 20:38:42 +0200 Subject: [PATCH] move nextcloud to cloud.rpqt.fr --- machines/crocus/nextcloud.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/machines/crocus/nextcloud.nix b/machines/crocus/nextcloud.nix index 522745b..dd0111e 100644 --- a/machines/crocus/nextcloud.nix +++ b/machines/crocus/nextcloud.nix @@ -1,7 +1,6 @@ { config, ... }: let - domain = "home.rpqt.fr"; - fqdn = "cloud.${domain}"; + fqdn = "cloud.rpqt.fr"; in { imports = [ @@ -52,7 +51,14 @@ in services.nginx.virtualHosts.${config.services.nextcloud.hostName} = { forceSSL = true; - useACMEHost = domain; + enableACME = true; + }; + + # Redirect internal domain to the public one + services.nginx.virtualHosts."cloud.home.rpqt.fr" = { + forceSSL = true; + useACMEHost = "home.rpqt.fr"; + locations."/".return = "301 http://${fqdn}$request_uri"; }; clan.core.vars.generators.nextcloud = {