From 1c0c7ce14a3dc8caecc79ea777a78a638c37a7ba Mon Sep 17 00:00:00 2001 From: tobinio Date: Mon, 15 Jun 2026 08:50:13 +0200 Subject: [PATCH] try power usage improvements --- hosts/homeserver/configuration.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/hosts/homeserver/configuration.nix b/hosts/homeserver/configuration.nix index f669c7c..593c274 100644 --- a/hosts/homeserver/configuration.nix +++ b/hosts/homeserver/configuration.nix @@ -29,6 +29,31 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + # Power saving settings + services.tlp = { + enable = true; + settings = { + # Force the CPU to prioritize power saving + CPU_SCALING_GOVERNOR_ON_AC = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "power"; + + # Enable aggressive link power management for SATA/PCIe drives + SATA_LINKPWR_ON_AC = "med_power_with_dipm"; + + # Enable Audio power saving + SOUND_POWER_SAVE_ON_AC = 1; + }; + }; + + boot.kernelParams = [ + "pcie_aspm=force" # Force PCIe Active State Power Management + "i915.enable_fbc=1" # Enable Intel Framebuffer Compression (saves power on the iGPU) + "i915.enable_guc=3" # Enable Intel GuC/HuC firmware loading for efficient video decoding + ]; + + # Ensure Intel microcode updates are applied + hardware.cpu.intel.updateMicrocode = true; + # Enable networking networking.networkmanager.enable = true; @@ -78,6 +103,7 @@ packages = with pkgs; [ vim ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILOCwSuCsDPEB9/J/rMEh/A85UTaF0M/1UCHT0xcAWS8 huff@pc" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFGSQFcDKkreJaTVGBkY6osVYF77v1+G1+/QMmbyEmJa hufflaptop@hufflaptop" ]; shell = pkgs.fish; }; @@ -95,6 +121,10 @@ git just sops + + # Power efficient + powertop + lm_sensors ]; sops = { -- 2.51.2