Add all of iogamaster modules

This commit is contained in:
2024-06-15 09:59:52 +02:00
parent c97f22254a
commit fa99b32cad
120 changed files with 3587 additions and 254 deletions

View File

@@ -0,0 +1,41 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul;
let
cfg = config.modules.system.battery;
in
{
options.modules.system.battery = with types; {
enable = mkBoolOpt false "Whether or not to enable battery optimizations and utils.";
};
config = mkIf cfg.enable {
# Better scheduling for CPU cycles - thanks System76!!!
services.system76-scheduler.settings.cfsProfiles.enable = true;
# Enable TLP (better than gnomes internal power manager)
services.tlp = {
enable = true;
settings = {
CPU_BOOST_ON_AC = 0;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
};
};
# Disable GNOMEs power management
services.power-profiles-daemon.enable = false;
# Enable powertop
powerManagement.powertop.enable = true;
# Enable thermald (only necessary if on Intel CPUs)
services.thermald.enable = true;
};
}