configuration
common
desktop
audio.nix
default.nix
firmware.nix
fonts.nix
gnome.nix
inputs.nix
networking.nix
polkit.nix
power.nix
printing.nix
ssh.nix
xserver.nix
dn42
gpg-ssh
hydra-build-machine
router
flake
hosts
lib
modules
pkgs
profiles
users
.gitignore
README.md
flake.lock
flake.nix
43 lines
1016 B
Nix
43 lines
1016 B
Nix
{ lib, config, ... }:
|
|
|
|
{
|
|
boot.resumeDevice = lib.optionalString ((lib.length config.swapDevices) > 0) (lib.head config.swapDevices).device;
|
|
services.logind = {
|
|
lidSwitch = "suspend-then-hibernate";
|
|
};
|
|
systemd.sleep.extraConfig = ''
|
|
HibernateDelaySec=30m
|
|
'';
|
|
|
|
services.upower = {
|
|
percentageLow = 20;
|
|
percentageCritical = 10;
|
|
percentageAction = 8;
|
|
};
|
|
|
|
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";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
gdm.databases = [
|
|
{
|
|
settings = {
|
|
"org/gnome/settings-daemon/plugins/power" = {
|
|
power-button-action = "hibernate";
|
|
power-saver-profile-on-low-battery = false;
|
|
sleep-inactive-ac-type = "nothing";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|