{ ... }: { services.nginx.virtualHosts = { "www.clerie.de" = { enableACME = true; forceSSL = true; locations."/" = { return = "301 https://clerie.de$request_uri"; }; }; "clerie.de" = { enableACME = true; forceSSL = true; root = fetchGit { url = "https://git.clerie.de/clerie/clerie.de.git"; ref = "main"; rev = "23e7b06dc15a8dcc320b2db9508e2192d33236cb"; }; locations."~ ^/.well-known/openpgpkey/hu/[a-z0-9]+/?$" = { extraConfig = '' default_type application/octet-stream; add_header Access-Control-Allow-Origin * always; try_files /gpg/clerie@clerie.de =404; ''; }; locations."= /.well-known/openpgpkey/policy" = { extraConfig = '' default_type application/octet-stream; add_header Access-Control-Allow-Origin * always; ''; return = "200 ''"; }; }; }; }