2024-10-12 23:37:46 +03:00
|
|
|
{
|
2024-11-04 04:37:29 +03:00
|
|
|
container,
|
|
|
|
config,
|
|
|
|
util,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
domain = "resume.${config.container.domain}";
|
|
|
|
in {
|
|
|
|
${domain} = container.mkServer {
|
|
|
|
extraConfig = util.trimTabs ''
|
|
|
|
server_name ${domain};
|
|
|
|
listen 443 ssl;
|
2024-10-12 23:37:46 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
ssl_certificate /etc/letsencrypt/live/${config.container.domain}/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/${config.container.domain}/privkey.pem;
|
|
|
|
include /etc/letsencrypt/conf/options-ssl-nginx.conf;
|
|
|
|
ssl_dhparam /etc/letsencrypt/conf/ssl-dhparams.pem;
|
2024-10-12 23:37:46 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
if ($http_accept_language ~ ru) {
|
|
|
|
return 301 https://${config.container.module.git.domain}/voronind/resume/releases/download/latest/VoronindRu.pdf;
|
|
|
|
}
|
2024-10-12 23:37:46 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
return 301 https://${config.container.module.git.domain}/voronind/resume/releases/download/latest/VoronindEn.pdf;
|
|
|
|
'';
|
|
|
|
};
|
2024-10-12 23:37:46 +03:00
|
|
|
}
|