-
-
Save thpham/c9efae629bba89fa38923f5e0288b02a 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