nix: added upower

Placed paower management into a single file
This commit is contained in:
Serĉanto de Scio 2021-05-09 16:34:31 +10:00
parent e18b5f4ca6
commit 50ed5245a3
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
4 changed files with 21 additions and 8 deletions

View file

@ -42,9 +42,4 @@
];
nix.maxJobs = lib.mkDefault 4;
powerManagement = {
enable = true;
cpuFreqGovernor = lib.mkDefault "powersave";
};
}

View file

@ -5,7 +5,7 @@
{
imports = [
../hardware/purism_librem_15.nix # Include the results of the hardware scan.
../hardware/purism_librem_15.nix # Include results of the hardware scan.
../profiles/android.nix # Provide an Android dev environment
../profiles/cron-craige.nix # Provide Craige's cron jobs
../profiles/daedalus.nix # The open source cryptocurrency wallet for ADA
@ -18,6 +18,7 @@
../profiles/nix-mio-ops.nix # mio-ops Nix tooling
../profiles/nixpkgs-dev.nix # Nix pkgs dev tools
../profiles/openssh.nix # Enable and configure openssh
../profiles/powerManagement.nix # Power management for laptops
../profiles/qemu.nix # Qemu virtualisation
../profiles/weechat.nix # Weechat environment
../profiles/xmonad.nix # Xmonad desktop environment

View file

@ -9,6 +9,7 @@
../profiles/host_common.nix
../profiles/daedalus.nix
../profiles/openssh.nix
../profiles/powerManagement.nix
../secrets/user-craige.nix
../secrets/user-fiona.nix
../secrets/user-hamish.nix
@ -61,8 +62,6 @@
};
};
powerManagement.enable = true;
sound.enable = true; # Enable sound.
# Configure common hardware settings

View file

@ -0,0 +1,18 @@
# Power management configuration for the laptops
{ config, pkgs, lib, ... }:
{
powerManagement = {
enable = true;
cpuFreqGovernor = lib.mkDefault "performance";
powertop.enable = true; # Enable powertop auto tuning on startup
};
services = {
upower = {
enable = true; # Enable application power managemetn support
};
};
}