66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{ ... }:
|
|
|
|
let enableACME = false;
|
|
port = toString 3000;
|
|
in {
|
|
|
|
security.acme = {
|
|
acceptTerms = true;
|
|
defaults.email = "me@riley.lgbt";
|
|
};
|
|
|
|
services.nginx.enable = true;
|
|
services.nginx.virtualHosts = {
|
|
|
|
"192.168.2.22" = {
|
|
listen = [{
|
|
port = 80;
|
|
addr = "192.168.2.22";
|
|
}];
|
|
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:${port}";
|
|
};
|
|
};
|
|
|
|
# Main domain that hosts my website
|
|
"riley.lgbt" = {
|
|
|
|
inherit enableACME;
|
|
|
|
listen = [{
|
|
port = if enableACME then 443 else 80;
|
|
addr = "77.169.117.112";
|
|
}];
|
|
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:${port}";
|
|
extraConfig = ''
|
|
proxy_set_header Host $host;
|
|
proxy_buffering off;
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
"rly.cx" = {
|
|
|
|
inherit enableACME;
|
|
|
|
listen = [{
|
|
port = if enableACME then 443 else 80;
|
|
addr = "77.169.117.112";
|
|
}];
|
|
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:${port}";
|
|
extraConfig = ''
|
|
proxy_set_header Host $host;
|
|
proxy_buffering off;
|
|
'';
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
}
|