This commit is contained in:
2026-03-25 19:47:00 +00:00
parent 20ffd3307c
commit a381c4886a
@@ -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" ];
};
};
};