mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-06 12:26:18 +01:00
feat(shoukei): pin home Wi-Fi to a static IPv4 & adjust networking.nix (#407)
This commit is contained in:
1 parent
e9d706aa96
commit
835b7f6df1
5 files changed
+237
-70
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user