1
Fork 0
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:
TheGeneralist 2026-10-09 14:50:35 +02:00
parent e0bddc241c
commit f32139af2c
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
2 changed files with 41 additions and 1 deletions

View file

@ -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;