1
0
nixfiles/configuration/desktop/power.nix

37 lines
909 B
Nix
Raw Permalink Normal View History

2023-06-19 22:45:01 +02:00
{ lib, config, ... }:
{
2023-09-23 17:55:26 +02:00
boot.resumeDevice = lib.optionalString ((lib.length config.swapDevices) > 0) (lib.head config.swapDevices).device;
2023-06-19 22:45:01 +02:00
services.logind = {
lidSwitch = "suspend-then-hibernate";
};
systemd.sleep.extraConfig = ''
HibernateDelaySec=30m
'';
programs.dconf.profiles = {
user.databases = [
{
settings = {
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "hibernate";
power-saver-profile-on-low-battery = false;
sleep-inactive-ac-type = "nothing";
};
};
}
];
2024-03-11 20:28:28 +01:00
gdm.databases = [
{
settings = {
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "hibernate";
2024-03-11 20:28:28 +01:00
power-saver-profile-on-low-battery = false;
sleep-inactive-ac-type = "nothing";
};
};
}
];
};
2023-06-19 22:45:01 +02:00
}