zephyrus: enable tlp service and hardware module

This commit is contained in:
Antoine Martin 2021-07-27 00:33:10 +02:00
parent fa6f54a03a
commit 0ff76742e2
4 changed files with 39 additions and 0 deletions

View file

@ -53,6 +53,22 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1627212500,
"narHash": "sha256-KMUQCT3JSqznp+dR6BTvbwLqPFErjNlotVpkp/P/ZmM=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "03e7686c72345f237405c0b46b153dccd3ec9913",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1627131378,
@ -90,6 +106,7 @@
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}

View file

@ -36,6 +36,13 @@
repo = "flake-utils";
ref = "master";
};
nixos-hardware = {
type = "github";
owner = "NixOS";
repo = "nixos-hardware";
ref = "master";
};
};
outputs = { self, nixpkgs, home-manager, ... } @inputs: {
@ -123,6 +130,10 @@
modules = [
./zephyrus.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-ssd
home-manager.nixosModule
self.nixosModules.home

View file

@ -53,6 +53,15 @@ in
xkbVariant = "us";
libinput.enable = true;
};
tlp = {
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
START_CHARGE_THRESH_BAT0 = 70;
STOP_CHARGE_THRESH_BAT0 = 80;
};
};
};
my.displayManager.sddm.enable = true;

View file

@ -41,4 +41,6 @@
swapDevices = [ ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.enableRedistributableFirmware = true;
}