rm nginx, adjust caddy for testing, redo rebuild script

This commit is contained in:
2025-10-12 13:44:28 -05:00
parent 2db7081bfc
commit d58262a043
3 changed files with 27 additions and 22 deletions

View File

@@ -1,5 +1,31 @@
{ pkgs, config, lib, ... }:
/*
no longer in use, replaced by caddy if
wanting to use again here is the boilerplate
for whatt o put in for each service
# internal reverse proxy entry
services.nginx.virtualHosts."${cfg.url}" = {
forceSSL = true;
sslCertificate = sec."ssl_blakedheld_crt".path;
sslCertificateKey = sec."ssl_blakedheld_key".path;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
};
};
# external reverse proxy entry
services.nginx.virtualHosts."${service}.blakedheld.xyz" = {
forceSSL = true;
sslCertificate = sec."ssl_blakedheld_crt".path;
sslCertificateKey = sec."ssl_blakedheld_key".path;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
};
};
*/
let
cfg = config.modules.homelab.nginx-proxy;
sec = config.sops.secrets;

View File

@@ -76,28 +76,7 @@ in
# # open firewall
# networking.firewall.allowedTCPPorts = [ cfg.port ];
# internal reverse proxy entry
services.nginx.virtualHosts."${cfg.url}" = {
forceSSL = true;
sslCertificate = sec."ssl_blakedheld_crt".path;
sslCertificateKey = sec."ssl_blakedheld_key".path;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
};
};
# uncomment for service hosted publicly
#---------------------------------------------------------------------------
# # external reverse proxy entry
# services.nginx.virtualHosts."${service}.blakedheld.xyz" = {
# forceSSL = true;
# sslCertificate = sec."ssl_blakedheld_crt".path;
# sslCertificateKey = sec."ssl_blakedheld_key".path;
# locations."/" = {
# proxyPass = "http://127.0.0.1:${toString cfg.port}";
# };
# };
#
# # add to glance public service
# modules.services.glance.links.<category> = [{
# title = service;

View File

@@ -251,7 +251,7 @@ in
# add to caddy for reverse proxy
services.caddy.virtualHosts."${cfg.url}" = {
serverAliases = [ "${homelab.public_domain}" ];
# serverAliases = [ "${homelab.public_domain}" ];
extraConfig = ''
tls ${sec."ssl_blakedheld_crt".path} ${sec."ssl_blakedheld_key".path}
reverse_proxy http://127.0.0.1:${toString cfg.port}