mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/zerotierone: switch from manually generating the .link file to use the module
Previously, systemd.network.links was only respected with networkd enabled, but it's really udev taking care of links, no matter if networkd is enabled or not. With our module fixed, there's no need to manually manage the text file anymore. This was originally applied in3d1079a20d
, but was reverted due to1115959a8d
causing evaluation errors on hydra.
This commit is contained in:
parent
355c58e485
commit
4e53f84c79
1 changed files with 9 additions and 8 deletions
|
@ -69,13 +69,14 @@ in
|
|||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
# Prevent systemd from potentially changing the MAC address
|
||||
environment.etc."systemd/network/50-zerotier.link".text = ''
|
||||
[Match]
|
||||
OriginalName=zt*
|
||||
|
||||
[Link]
|
||||
AutoNegotiation=false
|
||||
MACAddressPolicy=none
|
||||
'';
|
||||
systemd.network.links."50-zerotier" = {
|
||||
matchConfig = {
|
||||
OriginalName = "zt*";
|
||||
};
|
||||
linkConfig = {
|
||||
AutoNegotiation = false;
|
||||
MACAddressPolicy = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue