niksos/options/desktop/suspend.nix

19 lines
563 B
Nix
Raw Normal View History

2024-02-15 17:04:34 +01:00
{
inputs,
pkgs,
...
}: {
powerManagement = {
enable = true;
powerDownCommands = ''
${pkgs.mpc-cli}/bin/mpc pause
${inputs.nixpkgs-wayland.packages.${pkgs.system}.swaylock-effects}/bin/swaylock
${pkgs.coreutils-full}/bin/sleep 1
'';
powerUpCommands = ''
${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch dpms off HDMI-A-1
${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch dpms on HDMI-A-1
'';
};
}