feat!: enable hibernation again
This commit is contained in:
parent
49f7cde4cd
commit
0b54e1877e
2 changed files with 27 additions and 12 deletions
|
@ -95,17 +95,32 @@ in
|
||||||
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts =
|
||||||
{
|
let
|
||||||
timeout = 300;
|
lockTimeout = 10;
|
||||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
in
|
||||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
[
|
||||||
}
|
{
|
||||||
{
|
timeout = lockTimeout * 60 - 10;
|
||||||
timeout = 310;
|
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
}
|
||||||
}
|
{
|
||||||
];
|
timeout = lockTimeout * 60;
|
||||||
|
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||||
|
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = lockTimeout * 60 + 10;
|
||||||
|
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||||
|
}
|
||||||
|
] ++ optional
|
||||||
|
(!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728
|
||||||
|
[
|
||||||
|
{
|
||||||
|
timeout = 30 * 60;
|
||||||
|
command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate";
|
||||||
|
}
|
||||||
|
];
|
||||||
systemdTarget = "hyprland-session.target";
|
systemdTarget = "hyprland-session.target";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
}: {
|
}: {
|
||||||
## System security tweaks
|
## System security tweaks
|
||||||
# Prevent replacing the running kernel w/o reboot
|
# Prevent replacing the running kernel w/o reboot
|
||||||
security.protectKernelImage = lib.mkDefault true;
|
# security.protectKernelImage = lib.mkDefault true; # NOTE disabled for now to enable hibernate
|
||||||
|
|
||||||
# tmpfs = /tmp is mounted in ram. Doing so makes temp file management speedy
|
# tmpfs = /tmp is mounted in ram. Doing so makes temp file management speedy
|
||||||
# on ssd systems, and volatile! Because it's wiped on reboot.
|
# on ssd systems, and volatile! Because it's wiped on reboot.
|
||||||
|
|
Loading…
Reference in a new issue