fix throttled on T480 hardened

This commit is contained in:
Cyryl Płotnicki 2021-07-18 18:53:01 +01:00
parent a69e350bbe
commit 1753c52950
5 changed files with 12 additions and 7 deletions

View file

@ -1,6 +1,10 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
powerManagement.cpuFreqGovernor = "ondemand"; boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
nixpkgs.overlays = [ (self: super: { buildLinux = x: super.buildLinux ({
ignoreConfigErrors = true;
enableParallelBuilding = true;
} // x); } ) ];
boot.kernelPatches = [ { boot.kernelPatches = [ {
name = "foureighty"; name = "foureighty";
patch = null; patch = null;
@ -20,6 +24,7 @@
STRICT_KERNEL_RWX y STRICT_KERNEL_RWX y
DEVMEM y
STRICT_DEVMEM y STRICT_DEVMEM y
DEBUG_CREDENTIALS y DEBUG_CREDENTIALS y
DEBUG_NOTIFIERS y DEBUG_NOTIFIERS y

View file

@ -1,9 +1,10 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, lib, ... }:
{ {
networking.hostName = "foureighty"; networking.hostName = "foureighty";
imports = [ imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
./custom-kernel.nix
./hardware-configuration.nix ./hardware-configuration.nix
./nvidia.nix ./nvidia.nix
../../boot.nix ../../boot.nix
@ -29,11 +30,13 @@
memoryPercent = 75; memoryPercent = 75;
}; };
boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
hardware.trackpoint.enable = true; hardware.trackpoint.enable = true;
services.hardware.bolt.enable = true; services.hardware.bolt.enable = true;
powerManagement.cpuFreqGovernor = lib.mkForce "ondemand";
hardware.video.hidpi.enable = lib.mkDefault true;
services.fprintd = { services.fprintd = {
enable = true; enable = true;
}; };

View file

@ -26,9 +26,6 @@
swapDevices = [ ]; swapDevices = [ ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.video.hidpi.enable = lib.mkDefault true;
nix.maxJobs = 2; nix.maxJobs = 2;
nix.buildCores = 6; nix.buildCores = 6;
} }

View file

@ -21,5 +21,6 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
services.thermald.enable = true;
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
} }

View file

@ -55,6 +55,5 @@
}; };
powerManagement.enable = (lib.mkForce true); powerManagement.enable = (lib.mkForce true);
powerManagement.cpuFreqGovernor = (lib.mkForce null);
powerManagement.powertop.enable = true; powerManagement.powertop.enable = true;
} }