moved all services out of nixos containers

fixed a lot as well
This commit is contained in:
Gerg-L 2023-09-18 22:38:12 -04:00
parent 4fd4b0ad74
commit 66ee1bb541
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
10 changed files with 247 additions and 266 deletions

View file

@ -0,0 +1,54 @@
_: {
config,
lib,
...
}: {
sops.secrets =
lib.genAttrs [
"nixfu_ssl_cert"
"nixfu_ssl_key"
"gerg_ssl_key"
"gerg_ssl_cert"
]
(_: {
owner = config.services.nginx.user;
inherit (config.services.nginx) group;
});
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"nix-fu.com" = {
forceSSL = true;
sslCertificate = config.sops.secrets.nixfu_ssl_cert.path;
sslCertificateKey = config.sops.secrets.nixfu_ssl_key.path;
serverAliases = ["www.nix-fu.com"];
globalRedirect = "github.com/Gerg-L";
};
"search.gerg-l.com" = {
forceSSL = true;
sslCertificate = config.sops.secrets.gerg_ssl_cert.path;
sslCertificateKey = config.sops.secrets.gerg_ssl_key.path;
locations."/".extraConfig = "uwsgi_pass unix:${config.services.searx.uwsgiConfig.socket};";
extraConfig = "access_log off;";
};
"git.gerg-l.com" = {
forceSSL = true;
sslCertificate = config.sops.secrets.gerg_ssl_cert.path;
sslCertificateKey = config.sops.secrets.gerg_ssl_key.path;
locations."/".proxyPass = "http://unix:${config.services.gitea.settings.server.HTTP_ADDR}";
};
"next.gerg-l.com" = {
forceSSL = true;
sslCertificate = config.sops.secrets.gerg_ssl_cert.path;
sslCertificateKey = config.sops.secrets.gerg_ssl_key.path;
};
};
};
networking.firewall.allowedTCPPorts = [80 443];
_file = ./nginx.nix;
}