From 1f531eeff3cb1fbeaa28db1b98948b48892be7cf Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 1 Sep 2026 14:36:10 +0200 Subject: [PATCH] add resume device for nice hibernation and add tlp --- modules/hosts/base/configuration.nix | 1 - modules/hosts/seele/configuration.nix | 39 ++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/modules/hosts/base/configuration.nix b/modules/hosts/base/configuration.nix index ded13b7..5fc63ea 100644 --- a/modules/hosts/base/configuration.nix +++ b/modules/hosts/base/configuration.nix @@ -16,7 +16,6 @@ hardware.graphics.enable = true; time.timeZone = "Europe/Berlin"; i18n.defaultLocale = "en_US.UTF-8"; - services.desktopManager.gnome.enable = true; services.displayManager.gdm.enable = true; programs.niri = { enable = true; diff --git a/modules/hosts/seele/configuration.nix b/modules/hosts/seele/configuration.nix index c448947..943d96f 100644 --- a/modules/hosts/seele/configuration.nix +++ b/modules/hosts/seele/configuration.nix @@ -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. } -