Compare commits

3 Commits

Author SHA1 Message Date
2bf18319c9 nixos/routing-common: Fix keepalived link-local addresses
All checks were successful
CI / Check, build and cache nixfiles (push) Successful in 1h17m1s
2026-03-16 15:12:46 +00:00
a394b9124a nixos/routing-common: Fix Cloudflare 2026-03-16 13:37:16 +00:00
5bc48d33a3 nixos: Add tcpdump on all machines 2026-03-16 13:33:08 +00:00
4 changed files with 6 additions and 9 deletions

View File

@@ -33,7 +33,7 @@ def main():
print(f'Updating {args.record} -> {address}') print(f'Updating {args.record} -> {address}')
cf.dns.records.edit( cf.dns.records.edit(
zone_id=zone.id, dns_record_id=record.id, zone_id=zone.id, dns_record_id=record.id, name=args.record,
type='A', content=address) type='A', content=address)
if __name__ == '__main__': if __name__ == '__main__':

View File

@@ -20,10 +20,7 @@ let
}; };
vlanIface = vlan: if vlan == "as211024" then vlan else "lan-${vlan}"; vlanIface = vlan: if vlan == "as211024" then vlan else "lan-${vlan}";
vrrpIPs = family: concatMap (vlan: (optional (family == "v6") { vrrpIPs = family: concatMap (vlan: [
addr = "fe80::1/64";
dev = vlanIface vlan;
}) ++ [
{ {
addr = "${vips.${vlan}.${family}}/${toString (net.cidr.length prefixes.${vlan}.${family})}"; addr = "${vips.${vlan}.${family}}/${toString (net.cidr.length prefixes.${vlan}.${family})}";
dev = vlanIface vlan; dev = vlanIface vlan;
@@ -64,6 +61,9 @@ in
v4 = mkVRRP "v4" 51; v4 = mkVRRP "v4" 51;
v6 = (mkVRRP "v6" 52) // { v6 = (mkVRRP "v6" 52) // {
extraConfig = '' extraConfig = ''
virtual_ipaddress_excluded {
${concatMapStringsSep "\n" (vlan: "fe80::1/64 dev ${vlanIface vlan}") (attrNames vips)}
}
notify_master "${config.systemd.package}/bin/systemctl start radvd.service" root notify_master "${config.systemd.package}/bin/systemctl start radvd.service" root
notify_backup "${config.systemd.package}/bin/systemctl stop radvd.service" root notify_backup "${config.systemd.package}/bin/systemctl stop radvd.service" root
''; '';

View File

@@ -139,6 +139,7 @@ in
bash-completion bash-completion
git git
unzip unzip
tcpdump
] ]
(mkIf config.services.netdata.enable [ netdata ]) (mkIf config.services.netdata.enable [ netdata ])
]; ];

View File

@@ -36,10 +36,6 @@ in
}; };
documentation.nixos.enable = mkDefault' false; documentation.nixos.enable = mkDefault' false;
environment.systemPackages = with pkgs; [
tcpdump
];
}; };
meta.buildDocsInSandbox = false; meta.buildDocsInSandbox = false;