wip: idk if this is gonna work, but lets see
This commit is contained in:
parent
b014c1759e
commit
8994b800a0
2 changed files with 133 additions and 102 deletions
|
|
@ -343,104 +343,6 @@
|
|||
# networking.firewall.enable = false;
|
||||
|
||||
|
||||
services.nginx =
|
||||
let
|
||||
|
||||
extra = ''
|
||||
client_max_body_size 50000M;
|
||||
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
send_timeout 600s;'';
|
||||
proxy = name: url: {
|
||||
forceSSL = true;
|
||||
useACMEHost = name;
|
||||
extraConfig = extra;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = url;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.nginx.override {
|
||||
modules = [ pkgs.nginxModules.brotli ];
|
||||
};
|
||||
|
||||
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
commonHttpConfig = ''
|
||||
brotli on;
|
||||
brotli_static on;
|
||||
brotli_types application/json application/javascript application/xml application/xml+rss image/svg+xml text/css text/html text/javascript text/plain text/xml;
|
||||
'';
|
||||
# sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
|
||||
virtualHosts = {
|
||||
"noa.voorwaarts.nl" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = extra;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://[::1]:8000";
|
||||
};
|
||||
};
|
||||
|
||||
"images.noa.voorwaarts.nl" = proxy "noa.voorwaarts.nl" "http://[::1]:2283/";
|
||||
"maintenance.noa.voorwaarts.nl" = proxy "noa.voorwaarts.nl" "http://[::1]:5000/";
|
||||
|
||||
"itepastra.nl" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = extra;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://[::1]:9001/";
|
||||
};
|
||||
};
|
||||
|
||||
"locked.itepastra.nl" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "itepastra.nl";
|
||||
extraConfig = ''
|
||||
${extra}
|
||||
ssl_client_certificate /etc/nginx/certificates/yubikey.crt;
|
||||
ssl_verify_client on;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
|
||||
keepalive_timeout 10;
|
||||
ssl_session_timeout 5m;
|
||||
'';
|
||||
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://[::1]:9000/";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "noa@voorwaarts.nl";
|
||||
certs = {
|
||||
"noa.voorwaarts.nl".extraDomainNames = [
|
||||
"images.noa.voorwaarts.nl"
|
||||
"maintenance.noa.voorwaarts.nl"
|
||||
];
|
||||
"itepastra.nl".extraDomainNames = [ "locked.itepastra.nl" ];
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue