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

@ -1,54 +0,0 @@
_: {
config,
lib,
...
}: {
sops.secrets = lib.mapAttrs (_: v:
{
owner = "nginx";
group = "nginx";
}
// v) {
nixfu_ssl_cert = {};
nixfu_ssl_key = {};
gerg_ssl_key = {};
gerg_ssl_cert = {};
};
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" "nix-fu.com"];
locations."/".return = "301 $scheme://www.github.com/Gerg-L$request_uri";
};
"search.Gerg-L.com" = {
forceSSL = true;
sslCertificate = config.sops.secrets.gerg_ssl_cert.path;
sslCertificateKey = config.sops.secrets.gerg_ssl_key.path;
locations."/".proxyPass = "http://localhost:${toString config.services.searx.settings.server.port}";
};
"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://192.168.1.11:3000";
};
"next.Gerg-L.com" = {
forceSSL = true;
sslCertificate = config.sops.secrets.gerg_ssl_cert.path;
sslCertificateKey = config.sops.secrets.gerg_ssl_key.path;
locations."/".proxyPass = "http://192.168.1.11:80";
};
};
};
networking.firewall = {
allowedTCPPorts = [80 443];
};
}