21 lines
509 B
Nix
21 lines
509 B
Nix
{ 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;
|
|
'';
|
|
};
|
|
}
|