services: sourcehut: set up redirect for additional subdomain

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-05-20 15:51:16 +02:00
parent 0f678e07a2
commit 5f1d34452a
Signed by: c8h4
GPG key ID: 73D5E7FDEE3DE49A

View file

@ -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;