Wpa supplicant: Difference between revisions
imported>Rasmus-kirk m Fixed MAC spelling and added a little info |
imported>Rasmus-kirk m Fixed mac spoofing code |
||
| Line 49: | Line 49: | ||
systemd.services.macchanger = { | systemd.services.macchanger = { | ||
enable = true; | enable = true; | ||
description = "macchanger on | description = "macchanger on wlxxxx"; | ||
wants = [ "network-pre.target" ]; | wants = [ "network-pre.target" ]; | ||
before = [ "network-pre.target" ]; | before = [ "network-pre.target" ]; | ||
bindsTo = [ "sys-subsystem-net-devices- | bindsTo = [ "sys-subsystem-net-devices-wlxxxx.device" ]; | ||
after = [ "sys-subsystem-net-devices- | after = [ "sys-subsystem-net-devices-wlxxxx.device" ]; | ||
wantedBy = [ "multi-user.target" ]; | wantedBy = [ "multi-user.target" ]; | ||
serviceConfig = { | serviceConfig = { | ||
Type = "oneshot"; | Type = "oneshot"; | ||
ExecStart = "${pkgs.macchanger}/bin/macchanger -r | ExecStart = "${pkgs.macchanger}/bin/macchanger -r wlxxxx"; | ||
}; | }; | ||
}; | }; | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Where you need to change the <code>wlxxxx</code> with your own wifi network interface. You can list your interfaces by running <code>ip link</code>, your wifi network interface should have "wl" prepended. Note that the above snippet fully randomizes your MAC address, for more information you can read macchanger's manpage. This obviously requires you to have the <code>macchanger</code> package installed. | |||
== External links == | == External links == | ||
[https://www.stura.htw-dresden.de/stura/ref/hopo/dk/nachrichten/eduroam-meets-nixos (german) article ''eduroam meets NixOS'' (with configuration)] (instance ''University of Applied Sciences Dresden'': The [https://cat.eduroam.org/?idp=5106&profile=5098 eduroam installer for GNU/Linux] works [https://www.htw-dresden.de/en/university/organisation/it-service-centre/services-for-workplace-and-communication/wi-fi-/-wlan/eduroam/linux for example for Ubuntu] but not [[NixOS]]) | [https://www.stura.htw-dresden.de/stura/ref/hopo/dk/nachrichten/eduroam-meets-nixos (german) article ''eduroam meets NixOS'' (with configuration)] (instance ''University of Applied Sciences Dresden'': The [https://cat.eduroam.org/?idp=5106&profile=5098 eduroam installer for GNU/Linux] works [https://www.htw-dresden.de/en/university/organisation/it-service-centre/services-for-workplace-and-communication/wi-fi-/-wlan/eduroam/linux for example for Ubuntu] but not [[NixOS]]) | ||