From 27b8253655217f46532625d07fb8d4cdbd649489 Mon Sep 17 00:00:00 2001 From: Daniel Fullmer Date: Thu, 9 Jan 2020 17:34:54 -0500 Subject: [PATCH] nixos/zerotierone: prevent systemd from changing MAC address --- nixos/modules/services/networking/zerotierone.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/services/networking/zerotierone.nix b/nixos/modules/services/networking/zerotierone.nix index 764af3846fe5..190ffdf4cad3 100644 --- a/nixos/modules/services/networking/zerotierone.nix +++ b/nixos/modules/services/networking/zerotierone.nix @@ -63,5 +63,15 @@ in networking.firewall.allowedUDPPorts = [ cfg.port ]; 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 + ''; }; }