mirror of
https://github.com/thegeneralist01/config.git
synced 2026-10-09 21:03:30 +02:00
nixos: reduce idle power usage
This commit is contained in:
parent
e0bddc241c
commit
f32139af2c
2 changed files with 41 additions and 1 deletions
|
|
@ -66,6 +66,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Blank displays without suspending the machine or its services.
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [{
|
||||
timeout = 600;
|
||||
command = "${pkgs.niri}/bin/niri msg action power-off-monitors";
|
||||
resumeCommand = "${pkgs.niri}/bin/niri msg action power-on-monitors";
|
||||
}];
|
||||
events.before-sleep =
|
||||
"${pkgs.niri}/bin/niri msg action power-off-monitors";
|
||||
};
|
||||
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue