Created
December 15, 2016 10:34
-
-
Save fadenb/d93d82351f4258454d5bd6d22ecb1af6 to your computer and use it in GitHub Desktop.
Change wireless network interface MAC at boot using macchanger on NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd = { | |
services = { | |
"macchanger-wireless" = { | |
description = "Changes MAC of my wireless interface for privacy reasons"; | |
wants = [ "network-pre.target" ]; | |
wantedBy = [ "multi-user.target" ]; | |
before = [ "network-pre.target" ]; | |
bindsTo = [ "sys-subsystem-net-devices-wlp3s0.device" ]; | |
after = [ "sys-subsystem-net-devices-wlp3s0.device" ]; | |
script = '' | |
${pkgs.macchanger}/bin/macchanger -e wlp3s0 | |
''; | |
serviceConfig.Type = "oneshot"; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment