add resume device for nice hibernation and add tlp

This commit is contained in:
lucy 2026-09-01 14:36:10 +02:00
commit 1f531eeff3
2 changed files with 32 additions and 8 deletions

View file

@ -1,12 +1,37 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../base/configuration.nix
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../base/configuration.nix
];
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 60;
};
};
powerManagement.powertop.enable = true;
systemd.sleep.settings.Sleep = {
HibernateDelaySec = "1h";
};
boot.resumeDevice = "/dev/disk/by-uuid/8e26be6b-4dff-4c85-9ab8-4765e1b2b581";
networking.hostName = "seele"; # Define your hostname.
}