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
|
||||
systemd.services.sleep-rfkill = {
|
||||
enable = true;
|
||||
DefaultDependencies = false;
|
||||
StopWhenUnneeded = true;
|
||||
description = "";
|
||||
description = "Custom suspend/resume hook";
|
||||
wantedBy = [ "sleep.target" ];
|
||||
before = [ "sleep.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${sleep-rfkill}";
|
||||
ExecStop = "${wake-rfkill}";
|
||||
# Command to run BEFORE system suspends
|
||||
ExecStart = "${pkgs.util-linux}/bin/rfkill block all";
|
||||
# Command to run AFTER system resumes
|
||||
ExecStop = "${pkgs.util-linux}/bin/rfkill unblock all";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "sleep.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user