1
0
nixfiles/hosts/web-2/clerie.nix

38 lines
971 B
Nix
Raw Normal View History

2021-01-23 13:27:43 +01:00
{ ... }:
{
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";
2021-12-12 13:35:13 +01:00
ref = "main";
2022-06-12 21:49:36 +02:00
rev = "67738c06cff85e2cefbea87d45c277bd01a3778a";
};
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 ''";
2021-01-23 13:27:43 +01:00
};
};
};
}