nix/container/proxy/host/Paste.nix

21 lines
509 B
Nix
Raw Normal View History

2024-06-01 10:37:49 +03:00
{ domain, util, mkServer, ... }: {
"paste.${domain}" = mkServer {
extraConfig = util.trimTabs ''
listen 443 ssl;
set $paste 10.1.0.14:80;
location = / {
return 403;
}
location / {
proxy_pass http://$paste$request_uri;
}
ssl_certificate /etc/letsencrypt/live/${domain}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${domain}/privkey.pem;
include /etc/letsencrypt/conf/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/conf/ssl-dhparams.pem;
'';
};
}