diff options
Diffstat (limited to 'modules/laptop.nix')
-rw-r--r-- | modules/laptop.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/laptop.nix b/modules/laptop.nix new file mode 100644 index 00000000..17acb381 --- /dev/null +++ b/modules/laptop.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: + +{ boot.kernelModules = [ "coretemp" ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ + x86_energy_perf_policy + ]; + + hardware = { + bluetooth.enable = true; + }; + + environment.systemPackages = with pkgs; [ + powerstat + powertop + ]; + + programs.light.enable = true; + + services.logind.extraConfig = '' + IdleAction=suspend + IdleActionSec=600 + ''; + + services.tlp = { + enable = true; + extraConfig = '' + CPU_SCALING_GOVERNOR_ON_BAT=powersave + ''; + }; + + services.xserver = { + libinput = { + enable = true; + naturalScrolling = true; + disableWhileTyping = true; + }; + }; + + systemd.services.nixos-upgrade.unitConfig.ConditionACPower = true; + systemd.services.nix-gc.unitConfig.ConditionACPower = true; +} |