1 Commits

Author SHA1 Message Date
b06982a443 WIP: router: add keepalived 2025-06-09 19:31:58 -07:00
4 changed files with 23 additions and 23 deletions

View File

@@ -14,6 +14,7 @@ in
./kea.nix ./kea.nix
./glance.nix ./glance.nix
./services.nix ./services.nix
./keepalived.nix
]; ];
# Secrix for secrets management # Secrix for secrets management
secrix.hostPubKey = vars.pubkey; secrix.hostPubKey = vars.pubkey;

View File

@@ -80,8 +80,6 @@ in
"|etappi.${sysdomain}^$dnsrewrite=${ifs.lan.p4}.12" "|etappi.${sysdomain}^$dnsrewrite=${ifs.lan.p4}.12"
"|etappi.${sysdomain}^$dnsrewrite=${ifs.lan.ulaPrefix}::12:1" "|etappi.${sysdomain}^$dnsrewrite=${ifs.lan.ulaPrefix}::12:1"
"|hass.${domain}^$dnsrewrite=${ifs.lan.ulaAddr}"
# Lab DNS rewrites # Lab DNS rewrites
"||lab.${domain}^$dnsrewrite=etappi.${sysdomain}" "||lab.${domain}^$dnsrewrite=etappi.${sysdomain}"

View File

@@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
let
vaks = import ./vaks.nix config;
in
{
services.keepalived = {
enable = true;
};
}

View File

@@ -60,15 +60,12 @@ in
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ]; plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
hash = "sha256-Gsuo+ripJSgKSYOM9/yl6Kt/6BFCA6BuTDvPdteinAI="; hash = "sha256-Gsuo+ripJSgKSYOM9/yl6Kt/6BFCA6BuTDvPdteinAI=";
}; };
virtualHosts."*.${domain}".extraConfig = '' virtualHosts."grouter.${domain}".extraConfig = ''
encode encode
tls { tls {
dns cloudflare {env.CF_API_KEY} dns cloudflare {env.CF_API_KEY}
resolvers 1.1.1.1 resolvers 1.1.1.1
} }
@grouter host grouter.${domain}
handle @grouter {
@grafana path /grafana /grafana/* @grafana path /grafana /grafana/*
handle @grafana { handle @grafana {
reverse_proxy localhost:${toString config.services.grafana.settings.server.http_port} reverse_proxy localhost:${toString config.services.grafana.settings.server.http_port}
@@ -83,12 +80,6 @@ in
handle /* { handle /* {
reverse_proxy localhost:${toString config.services.glance.settings.server.port} reverse_proxy localhost:${toString config.services.glance.settings.server.port}
} }
}
@hass host hass.${domain}
handle @hass {
reverse_proxy homeassistant.4.lab.l.cazzzer.com:8123
}
''; '';
}; };
} }