summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/hel.nix b/hel.nix
index 1bc07b54..dcd97ce5 100644
--- a/hel.nix
+++ b/hel.nix
@@ -492,10 +492,9 @@
492 }; 492 };
493 }; 493 };
494 494
495 services.udev.path = with pkgs; [ systemd ]; 495 services.udev.extraRules = with pkgs; ''
496 services.udev.extraRules = '' 496 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="${systemd}/bin/systemctl --no-block start prevent-suspend.service"
497 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="systemctl --no-block start prevent-suspend.service" 497 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block stop prevent-suspend.service"
498 SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="systemctl --no-block stop prevent-suspend.service"
499 ''; 498 '';
500} 499}
501 500