mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
profile/powersave: init from legacy
This commit is contained in:
parent
3c3fc6f527
commit
2d7eeb3aaf
5 changed files with 28 additions and 19 deletions
26
profiles/powersave/default.nix
Normal file
26
profiles/powersave/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.powersave;
|
||||
in
|
||||
{
|
||||
options.my.profiles.powersave = with lib; {
|
||||
enable = mkEnableOption "powersave profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
powertop
|
||||
s-tui
|
||||
];
|
||||
|
||||
powerManagement = {
|
||||
cpuFreqGovernor = "powersave";
|
||||
powertop.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
thermald.enable = true;
|
||||
upower.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue