feat(laptop): move power module into new laptop module
This commit is contained in:
parent
41ccb34bb3
commit
72011ba30a
5 changed files with 100 additions and 36 deletions
|
|
@ -4,7 +4,6 @@
|
|||
imports = [
|
||||
./bluetooth.nix
|
||||
./backlight.nix
|
||||
./power.nix
|
||||
];
|
||||
|
||||
options.systemModules.hardware = {
|
||||
|
|
@ -14,8 +13,5 @@
|
|||
backlight= {
|
||||
enable = lib.mkEnableOption "Enable backlight module";
|
||||
};
|
||||
power = {
|
||||
enable = lib.mkEnableOption "Enable power module";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemModules.hardware.power;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.system76-scheduler.settings.cfsProfiles.enable = true;
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
cpu_boost_on_ac = 1;
|
||||
cpu_boost_on_bat = 0;
|
||||
cpu_scaling_governor_on_ac = "performance";
|
||||
cpu_scaling_governor_on_bat = "powersave";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
upower.enable = true;
|
||||
thermald.enable = true;
|
||||
power-profiles-daemon.enable = false;
|
||||
logind = {
|
||||
lidSwitch = "suspend";
|
||||
};
|
||||
};
|
||||
powerManagement.powertop.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue