Add laptop module and remove unused dotfiles

This commit is contained in:
2024-06-25 13:12:17 -05:00
parent dee11161e8
commit 4424978387
25 changed files with 139 additions and 525 deletions

28
modules/nix/laptop.nix Normal file
View File

@@ -0,0 +1,28 @@
{ lib
, pkgs
, config
, ...
}:
with lib; let
cfg = config.simmer.laptop;
in
{
config.programs.light.enable = mkIf cfg.backlight.enable true;
config.powerManagement.powertop.enable = mkIf cfg.powersave.enable true;
config.services.auto-cpufreq = mkIf cfg.powersave.enable {
enable = true;
settings = {
battery = {
governor = "powersave";
turbo = "never";
};
charger = {
governor = "performance";
turbo = "auto";
};
};
};
}