feat(shoukei): pin home Wi-Fi to a static IPv4 & adjust networking.nix (#407)

This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-07 21:27:34 +08:00
1 parent e9d706aa96
commit 835b7f6df1
5 files changed
+237 -70

No files matched your search

+5 -3
View File
@@ -7,9 +7,11 @@
let
# Exporters bind to this host's static LAN IPv4 (the same address
# VictoriaMetrics scrapes), so the socket exists only on the LAN interface —
# defence in depth behind the firewall allowlist. Hosts without a static LAN
# address (laptops like shoukei, DHCP VMs like akane) run no exporters.
lanAddr = myvars.networking.hostsAddr.${config.networking.hostName}.ipv4 or null;
# defence in depth behind the firewall allowlist. Hosts without an always-on
# static LAN address (the `homeOnly` laptop, DHCP VMs like akane) run no
# exporters.
hostAddr = myvars.networking.hostsAddr.${config.networking.hostName} or { };
lanAddr = if hostAddr.homeOnly or false then null else hostAddr.ipv4 or null;
in
{
# enable the node exporter on all nixos hosts