tailscale: ignore tailscale link when using networkd
This commit is contained in:
parent
170a413797
commit
3b8a162680
|
@ -6,6 +6,7 @@ let
|
||||||
cfg = config.services.tailscale;
|
cfg = config.services.tailscale;
|
||||||
firewallOn = config.networking.firewall.enable;
|
firewallOn = config.networking.firewall.enable;
|
||||||
rpfMode = config.networking.firewall.checkReversePath;
|
rpfMode = config.networking.firewall.checkReversePath;
|
||||||
|
isNetworkd = config.networking.useNetworkd;
|
||||||
rpfIsStrict = rpfMode == true || rpfMode == "strict";
|
rpfIsStrict = rpfMode == true || rpfMode == "strict";
|
||||||
in {
|
in {
|
||||||
meta.maintainers = with maintainers; [ danderson mbaillie twitchyliquid64 ];
|
meta.maintainers = with maintainers; [ danderson mbaillie twitchyliquid64 ];
|
||||||
|
@ -69,5 +70,17 @@ in {
|
||||||
# linux distros.
|
# linux distros.
|
||||||
stopIfChanged = false;
|
stopIfChanged = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.dhcpcd.denyInterfaces = [ cfg.interfaceName ];
|
||||||
|
|
||||||
|
systemd.network.networks."50-tailscale" = mkIf isNetworkd {
|
||||||
|
matchConfig = {
|
||||||
|
Name = cfg.interfaceName;
|
||||||
|
};
|
||||||
|
linkConfig = {
|
||||||
|
Unmanaged = true;
|
||||||
|
ActivationPolicy = "manual";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue