framework: Enable hibernation and lock before doing it

This commit is contained in:
Natsu Kagami 2024-02-02 13:18:38 +01:00
parent cec9dd4d85
commit 2888c0a300
Signed by: nki
GPG key ID: 55A032EB38B49ADB
3 changed files with 8 additions and 1 deletions

View file

@ -397,6 +397,10 @@ in
# Lock after 15 minutes of idle
{ timeout = 15 * 60; command = cfg.lockCmd; }
];
events = [
{ event = "lock"; command = cfg.lockCmd; }
{ event = "before-sleep"; command = cfg.lockCmd; }
];
};
config.programs.waybar =

View file

@ -20,7 +20,7 @@
# Power Management
services.upower = {
enable = true;
criticalPowerAction = "PowerOff";
criticalPowerAction = "Hibernate";
usePercentageForPolicy = true;
percentageCritical = 3;

View file

@ -16,6 +16,9 @@
boot.kernelParams = [
# See https://community.frame.work/t/tracking-graphical-corruption-in-fedora-39-amd-3-03-bios/39073/143
"amdgpu.sg_display=0"
# Hibernation
"resume=UUID=fa8aaf51-b99f-4fb4-9230-8c0957d8af3f"
"resume_offset=5776640" # btrfs inspect-internal map-swapfile -r /var/swapfile
];
fileSystems."/" =