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";
|
2024-05-10 14:20:23 +02:00
|
|
|
rev = "785693e6826c6377c3f3200274c281d2ef3317b3";
|
|
|
|
hash = "sha256-cyTHOOm7hpPUD8paKB7Wci3RYAo6Jr/MI/Xqx4iwXwY=";
|
2022-04-15 13:58:07 +02:00
|
|
|
};
|
2024-04-16 22:28:26 +02:00
|
|
|
locations."/ssh" = {
|
2024-05-10 14:07:46 +02:00
|
|
|
extraConfig = ''
|
|
|
|
types {
|
|
|
|
text/plain pub;
|
|
|
|
}
|
|
|
|
'';
|
2024-04-16 22:28:26 +02:00
|
|
|
root = pkgs.clerie-keys;
|
|
|
|
};
|
2023-05-02 18:01:39 +02:00
|
|
|
locations."= /ssh/known_hosts" = {
|
|
|
|
alias = pkgs.writeText "known_hosts" (import ../../lib/ssh-known-hosts.nix);
|
2023-10-22 21:58:54 +02:00
|
|
|
extraConfig = ''
|
2024-05-10 14:07:46 +02:00
|
|
|
types { }
|
|
|
|
default_type "text/plain; charset=utf-8";
|
2023-10-22 21:58:54 +02:00
|
|
|
'';
|
2023-05-02 18:01:39 +02:00
|
|
|
};
|
2024-04-16 22:28:26 +02:00
|
|
|
locations."/gpg" = {
|
2024-05-10 14:07:46 +02:00
|
|
|
extraConfig = ''
|
|
|
|
types {
|
|
|
|
text/plain asc;
|
|
|
|
}
|
|
|
|
'';
|
2024-04-16 22:28:26 +02:00
|
|
|
root = pkgs.clerie-keys;
|
|
|
|
};
|
2022-04-15 13:58:07 +02:00
|
|
|
locations."~ ^/.well-known/openpgpkey/hu/[a-z0-9]+/?$" = {
|
2024-04-17 16:20:14 +02:00
|
|
|
root = pkgs.clerie-keys;
|
2022-04-15 13:58:07 +02:00
|
|
|
extraConfig = ''
|
2024-05-10 14:07:46 +02:00
|
|
|
types { }
|
|
|
|
default_type application/octet-stream;
|
2022-04-15 13:58:07 +02:00
|
|
|
add_header Access-Control-Allow-Origin * always;
|
|
|
|
try_files /gpg/clerie@clerie.de =404;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
locations."= /.well-known/openpgpkey/policy" = {
|
|
|
|
extraConfig = ''
|
2024-05-10 14:07:46 +02:00
|
|
|
types { }
|
|
|
|
default_type application/octet-stream;
|
2022-04-15 13:58:07 +02:00
|
|
|
add_header Access-Control-Allow-Origin * always;
|
|
|
|
'';
|
|
|
|
return = "200 ''";
|
2021-01-23 13:27:43 +01:00
|
|
|
};
|
2023-03-15 20:32:18 +01:00
|
|
|
extraConfig = ''
|
|
|
|
access_log /var/log/nginx/clerie.de.log combined_anon;
|
|
|
|
'';
|
2021-01-23 13:27:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|