From 643984e1ab212c3a28eed9b510b08c6919eb563b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ryan4yin=20=7C=20=E4=BA=8C=E8=8A=B1?= Date: Fri, 16 Oct 2026 00:50:41 +0800 Subject: [PATCH] fix(power): mask the package's tuned-ppd unit when ppdSupport is off (#460) The tuned package ships tuned-ppd.service with WantedBy=graphical.target, so activation starts it without /etc/tuned/ppd.conf and switch-to-configuration exits 4. Assisted-by: DeepSeek Harness (deepseek-flash) --- modules/nixos/power.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/nixos/power.nix b/modules/nixos/power.nix index 6a97622d..342fe205 100644 --- a/modules/nixos/power.nix +++ b/modules/nixos/power.nix @@ -1,4 +1,4 @@ -{ ... }: +{ config, lib, ... }: { # TuneD - Tuning Profile Delivery Mechanism for Linux # A modern replacement for PPD(power-profiles-daemon), and the only power manager @@ -20,4 +20,10 @@ # Battery/AC state, used by the desktops; tuned-ppd was the other consumer. services.upower.enable = true; + + # ppdSupport = false drops /etc/tuned/ppd.conf, but the tuned package ships its + # own tuned-ppd.service (WantedBy=graphical.target) which systemd.packages links + # regardless, so activation starts it, it fails on the missing config file and + # switch-to-configuration exits 4. Mask it. + systemd.units."tuned-ppd.service".enable = lib.mkIf (!config.services.tuned.ppdSupport) false; }