mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-20 14:31:28 +01:00
fix(power): pin the tuned profile per host, cap the VM hosts (#458)
Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
1 parent
65f1c8e306
commit
b4b293ebfa
6 files changed
+41
-21
No files matched your search
@@ -1,4 +1,4 @@
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
imports = mylib.scanPaths ./. ++ [ ../power.nix ];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
# TuneD - Tuning Profile Delivery Mechanism for Linux
|
||||
# A modern replacement for PPD(power-profiles-daemon)
|
||||
services.tuned = {
|
||||
enable = true;
|
||||
settings.dynamic_tuning = true;
|
||||
ppdSupport = true; # translation of power-profiles-daemon API calls to TuneD
|
||||
ppdSettings.main.default = "balanced"; # balanced / performance / power-saver
|
||||
};
|
||||
# DBus service that provides power management support to applications
|
||||
# Required by `tuned-ppd` for handling power supply changes
|
||||
services.upower.enable = true;
|
||||
|
||||
services.power-profiles-daemon.enable = false; # conflicts with tuned
|
||||
services.tlp.enable = false; # conflicts with tuned
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ ... }:
|
||||
{
|
||||
# TuneD - Tuning Profile Delivery Mechanism for Linux
|
||||
# A modern replacement for PPD(power-profiles-daemon), and the only power manager
|
||||
# here: nixpkgs' tuned module already disables power-profiles-daemon and fails
|
||||
# the build if TLP, auto-cpufreq or system76-power is enabled as well.
|
||||
services.tuned = {
|
||||
enable = true;
|
||||
settings.dynamic_tuning = true;
|
||||
|
||||
# Hosts pin their profile with `services.tuned.recommend` (an empty rule
|
||||
# matches any host): TuneD reads /etc/tuned/recommend.conf in its automatic
|
||||
# profile mode on every boot. `ppdSettings.main.default` looks like it does
|
||||
# the same, but never wins -- tuned-ppd restores the base profile it saved in
|
||||
# /etc/tuned/ppd_base_profile, or TuneD's own recommendation, first. Nothing
|
||||
# here uses the PPD D-Bus API, so tuned-ppd stays off instead of overwriting
|
||||
# the pinned profile at startup.
|
||||
ppdSupport = false;
|
||||
};
|
||||
|
||||
# Battery/AC state, used by the desktops; tuned-ppd was the other consumer.
|
||||
services.upower.enable = true;
|
||||
}
|
||||
Reference in new issue
Block a user