nix/host/x86_64-linux/home/nginx/Resume.nix
2025-01-09 19:03:27 +03:00

18 lines
489 B
Nix

{ config, ... }:
let
cfg = config.const.host.nginx;
in
{
"resume.${cfg.domain}" = {
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
locations."/".extraConfig =
cfg.allowLocal
+ ''
if ($http_accept_language ~ ru) {
return 301 https://git.voronind.com/voronind/resume/releases/download/latest/VoronindRu.pdf;
}
return 301 https://git.voronind.com/voronind/resume/releases/download/latest/VoronindEn.pdf;
'';
};
}