Nginx added
This commit is contained in:
parent
e3462e043c
commit
e97d0c52da
1 changed files with 73 additions and 31 deletions
|
@ -1,17 +1,8 @@
|
||||||
|
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [ 80 443 ];
|
allowedTCPPorts = [ 80 443 ];
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers = {
|
|
||||||
containers = {
|
|
||||||
"gitea" = {
|
|
||||||
image = "gitea/gitea:1.15.6-rootless";
|
|
||||||
ports = [ "3030:3000" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -21,29 +12,80 @@ virtualisation.oci-containers = {
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
# Only allow PFS-enabled ciphers with AES256
|
virtualHosts = {
|
||||||
# sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
"git.wastring.com" = {
|
||||||
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
# Add any further config to match your needs, e.g.:
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
virtualHosts = let
|
forceSSL = true;
|
||||||
base = locations: {
|
locations."/" = {
|
||||||
inherit locations;
|
proxyPass = "http://172.17.0.1:3009";
|
||||||
|
proxyWebsockets = true;
|
||||||
addSSL = true;
|
};
|
||||||
sslCertificateKey = "/home/fw/nix-config/.lego/certificates/wastring.com.key";
|
|
||||||
sslCertificate = "/home/fw/nix-config/.lego/certificates/wastring.com.crt";
|
|
||||||
# sslTrustedCertificate = "/home/fw/nix-config/.lego/certificates/wastring.com.issuer.crt";
|
|
||||||
};
|
};
|
||||||
proxy = port: base {
|
"cal.wastring.com" = {
|
||||||
"/" = {
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
proxyPass = "http://172.17.0.1:" + toString(port) + "/";
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
proxyWebsockets = true;
|
forceSSL = true;
|
||||||
};
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:5232";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in {
|
"warden.wastring.com" = {
|
||||||
# Define example.com as reverse-proxied service on 127.0.0.1:3000
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
"git.wastring.com" = proxy 3030 // { default = true; };
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
};
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:8083";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"home.wastring.com" = {
|
||||||
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:8085";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"search.wastring.com" = {
|
||||||
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:8060";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"docs.wastring.com" = {
|
||||||
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:8003";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"bilder.wastring.com" = {
|
||||||
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:2283";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"wastring.com" = {
|
||||||
|
sslCertificateKey = "/certs/.lego/certificates/wastring.com.key";
|
||||||
|
sslCertificate = "/certs/.lego/certificates/wastring.com.crt";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://172.17.0.1:8085";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue