yuh
This commit is contained in:
@@ -14,19 +14,17 @@
|
|||||||
{
|
{
|
||||||
# My laptop doesn't like having connectivity when it goes to sleep, it burns through battery
|
# My laptop doesn't like having connectivity when it goes to sleep, it burns through battery
|
||||||
systemd.services.sleep-rfkill = {
|
systemd.services.sleep-rfkill = {
|
||||||
enable = true;
|
description = "Custom suspend/resume hook";
|
||||||
DefaultDependencies = false;
|
wantedBy = [ "sleep.target" ];
|
||||||
StopWhenUnneeded = true;
|
|
||||||
description = "";
|
|
||||||
before = [ "sleep.target" ];
|
before = [ "sleep.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${sleep-rfkill}";
|
# Command to run BEFORE system suspends
|
||||||
ExecStop = "${wake-rfkill}";
|
ExecStart = "${pkgs.util-linux}/bin/rfkill block all";
|
||||||
|
# Command to run AFTER system resumes
|
||||||
|
ExecStop = "${pkgs.util-linux}/bin/rfkill unblock all";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
};
|
};
|
||||||
wantedBy = [ "sleep.target" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user