From 5f1d34452a175ed791d5f821b6f4f638e9a19eaa Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Mon, 20 May 2024 15:51:16 +0200 Subject: [PATCH] services: sourcehut: set up redirect for additional subdomain Signed-off-by: Christoph Heiss --- services/sourcehut.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/sourcehut.nix b/services/sourcehut.nix index 1a76d71..d265da7 100644 --- a/services/sourcehut.nix +++ b/services/sourcehut.nix @@ -109,6 +109,14 @@ in { metasrht.extraGroups = [ "sourcehut" ]; }; + services.nginx.virtualHosts."git.${domain}" = { + forceSSL = true; + useACMEHost = my.domain; + kTLS = true; + # `globalRedirect` appends `$request_uri` to the target, which we do not want here + locations."/".return = "https://git.${fqdn}"; + }; + services.restic.backups.gitsrht = { environmentFile = secrets."restic/rest-env".path; initialize = true;