nixos/routing-common: Clear IPv6 local default route
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 25m16s

This commit is contained in:
Jack O'Sullivan 2024-03-13 21:52:09 +00:00
parent 6bc5cd79da
commit f540edb361

View File

@ -152,15 +152,27 @@ in
networking.domain = "h.${pubDomain}"; networking.domain = "h.${pubDomain}";
systemd.services = { systemd.services =
ipsec = let
let waitOnline = "systemd-networkd-wait-online@wan.service";
waitOnline = "systemd-networkd-wait-online@wan.service"; in
in {
{ ipsec = {
after = [ waitOnline ]; after = [ waitOnline ];
requires = [ waitOnline ]; requires = [ waitOnline ];
}; };
ipv6-clear-default-route = {
description = "Clear IPv6 RA default route";
after = [ waitOnline ];
requires = [ waitOnline ];
script = ''
# Seems like we can sometimes pick up a default route somehow...
${pkgs.iproute2}/bin/ip -6 route del default via fe80::1 || true
'';
serviceConfig.Type = "oneshot";
wantedBy = [ "multi-user.target" ];
};
}; };
systemd.network = { systemd.network = {