feat(system): add laptop power preset module

New `nomarchy.system.laptop.{enable,thermald}` options. `enable`
defaults to `formFactor == "laptop"`, so the installer's existing
formFactor write auto-flips the preset on without installer changes.

The module wires TLP (governors + 75/80 charge thresholds),
force-disables power-profiles-daemon (mutually exclusive with TLP),
enables upower and thermald (x86_64), adds the brightnessctl udev
rule so the existing brightness scripts work without root, and sets
a logind lid-switch policy that resolves to suspend-then-hibernate
when `hibernation.enable` is on, plain suspend otherwise.

Closes the "Form-factor → laptop preset auto-enable" Now item and
the "Laptop preset module" Next item from docs/ROADMAP.md in one
change.
This commit is contained in:
Bernardo Magri
2026-04-26 08:31:19 +01:00
parent 7086a6f29c
commit 034da701a3
5 changed files with 82 additions and 5 deletions

View File

@@ -19,6 +19,7 @@
./browser.nix
# Tier 1 system features (all opt-in via nomarchy.system.*).
./snapper.nix
./laptop.nix
./hibernate.nix
./containers.nix
./pam.nix