diff --git a/modules/nextcloud.nix b/modules/nextcloud.nix index b1dd2b4..ff5c191 100644 --- a/modules/nextcloud.nix +++ b/modules/nextcloud.nix @@ -1,6 +1,7 @@ { config, pkgs, lib, ... }: let domain = "nc.${config.fsr.domain}"; + legacy_domain = "oc.ifsr.de"; in { sops.secrets = { @@ -35,6 +36,11 @@ in enableACME = true; forceSSL = true; }; + nginx.virtualHosts.${legacy_domain} = { + enableACME = true; + forceSSL = true; + locations."/".return = "301 https://nc.ifsr.de"; + }; }; # ensure that postgres is running *before* running the setup