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

44 lines
1.2 KiB
Nix
Raw Normal View History

2022-10-17 23:03:09 +02:00
{ pkgs, ... }:
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;
2022-10-17 23:03:09 +02:00
root = pkgs.fetchgit {
2021-01-23 13:27:43 +01:00
url = "https://git.clerie.de/clerie/clerie.de.git";
2023-10-12 22:16:44 +02:00
rev = "9417332ff85b058901d9875828f9dea8247bb431";
hash = "sha256-bCTyhyPeCNHsGDfyYA5yM0OA8040XFO3Gvakrco+FEo=";
};
2023-05-02 18:01:39 +02:00
locations."= /ssh/known_hosts" = {
alias = pkgs.writeText "known_hosts" (import ../../lib/ssh-known-hosts.nix);
};
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
};
extraConfig = ''
access_log /var/log/nginx/clerie.de.log combined_anon;
'';
2021-01-23 13:27:43 +01:00
};
};
}