mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 12:30:23 +01:00
feat: add power management service
This commit is contained in:
@@ -19,6 +19,7 @@ in
|
|||||||
|
|
||||||
# disable sunshine for securrity
|
# disable sunshine for securrity
|
||||||
services.sunshine.enable = lib.mkForce false;
|
services.sunshine.enable = lib.mkForce false;
|
||||||
|
services.tuned.ppdSettings.main.default = lib.mkForce "power-saver";
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
services.sunshine.enable = lib.mkForce true;
|
services.sunshine.enable = lib.mkForce true;
|
||||||
|
services.tuned.ppdSettings.main.default = lib.mkForce "performance";
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
|
|||||||
17
modules/nixos/desktop/power.nix
Normal file
17
modules/nixos/desktop/power.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
# 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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user