diff options
author | Florian Klink <flokli@flokli.de> | 2020-03-11 00:26:51 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2020-03-19 14:16:26 +0100 |
commit | 4e53f84c79c4b4670dcebf00c1c92928439a87b9 (patch) | |
tree | e21e51b6c80c6d526635cc510c43b9011eb63a20 | |
parent | 355c58e485e76a4b91bb4613ee2a3e1bae809d28 (diff) | |
download | nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.tar nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.tar.gz nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.tar.bz2 nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.tar.lz nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.tar.xz nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.tar.zst nixpkgs-4e53f84c79c4b4670dcebf00c1c92928439a87b9.zip |
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 in 3d1079a20dafd82fac7ac857e63c91e787f4eaaa, but was reverted due to 1115959a8d4d73ad73341563dc8bbf52230a281e causing evaluation errors on hydra.
-rw-r--r-- | nixos/modules/services/networking/zerotierone.nix | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nixos/modules/services/networking/zerotierone.nix b/nixos/modules/services/networking/zerotierone.nix index 042c4d5addd..cf39ed065a7 100644 --- a/nixos/modules/services/networking/zerotierone.nix +++ b/nixos/modules/services/networking/zerotierone.nix @@ -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"; + }; + }; }; } |