Skip to content

Commit

Permalink
nixos/wpa_supplicant: always run systemctl of the currently running s…
Browse files Browse the repository at this point in the history
…ystemd
  • Loading branch information
flokli committed May 21, 2020
1 parent 52e104c commit 1955982
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/networking/wpa_supplicant.nix
Expand Up @@ -253,12 +253,12 @@ in {
};

powerManagement.resumeCommands = ''
${config.systemd.package}/bin/systemctl try-restart wpa_supplicant
/run/current-system/systemd/bin/systemctl try-restart wpa_supplicant
'';

# Restart wpa_supplicant when a wlan device appears or disappears.
services.udev.extraRules = ''
ACTION=="add|remove", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", RUN+="${config.systemd.package}/bin/systemctl try-restart wpa_supplicant.service"
ACTION=="add|remove", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", RUN+="/run/current-system/systemd/bin/systemctl try-restart wpa_supplicant.service"
'';
};

Expand Down

0 comments on commit 1955982

Please sign in to comment.