From fb96e4f3aa22b2aba2c455253e6c2e0d62b4535f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sat, 14 Mar 2026 14:27:35 +0100 Subject: [PATCH] feat: add power-efficiency settings for fw16 --- hosts/fw16/configuration.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hosts/fw16/configuration.nix b/hosts/fw16/configuration.nix index 32a3a3e..aa2ae13 100644 --- a/hosts/fw16/configuration.nix +++ b/hosts/fw16/configuration.nix @@ -38,6 +38,23 @@ in boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.kernelParams = [ "pcie_aspm.policy=powersupersave" ]; + + boot.resumeDevice = "/dev/disk/by-uuid/ff4750e7-3a9f-42c2-bb68-c458a6560540"; + + services.logind = { + lidSwitch = "suspend-then-hibernate"; + extraConfig = '' + HandlePowerKey=suspend-then-hibernate + IdleAction=suspend-then-hibernate + IdleActionSec=15min + ''; + }; + + systemd.sleep.extraConfig = '' + HibernateDelaySec=30min + ''; + # WARN:(@janezicmatej) nix-ld for running pip-installed binaries outside nix, probably want to drop this programs.nix-ld.enable = true; programs.nix-ld.libraries = options.programs.nix-ld.libraries.default; @@ -64,6 +81,12 @@ in hardware.bluetooth.powerOnBoot = true; hardware.inputmodule.enable = true; + # NOTE:(@janezicmatej) disable wakeup for framework input modules to prevent spurious wakes + services.udev.extraRules = lib.mkAfter '' + SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled" + SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0014", ATTR{power/wakeup}="disabled" + ''; + programs.nm-applet.enable = true; networking = {