diff --git a/nixos/boxes/foureighty/custom-kernel.nix b/nixos/boxes/foureighty/custom-kernel.nix index 4d1acab0..27526575 100644 --- a/nixos/boxes/foureighty/custom-kernel.nix +++ b/nixos/boxes/foureighty/custom-kernel.nix @@ -1,6 +1,10 @@ { 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 = [ { name = "foureighty"; patch = null; @@ -20,6 +24,7 @@ STRICT_KERNEL_RWX y + DEVMEM y STRICT_DEVMEM y DEBUG_CREDENTIALS y DEBUG_NOTIFIERS y diff --git a/nixos/boxes/foureighty/default.nix b/nixos/boxes/foureighty/default.nix index bda75113..dcfe0938 100644 --- a/nixos/boxes/foureighty/default.nix +++ b/nixos/boxes/foureighty/default.nix @@ -1,9 +1,10 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, inputs, lib, ... }: { networking.hostName = "foureighty"; imports = [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 + ./custom-kernel.nix ./hardware-configuration.nix ./nvidia.nix ../../boot.nix @@ -29,11 +30,13 @@ memoryPercent = 75; }; - boot.kernelPackages = pkgs.linuxPackages_latest_hardened; time.timeZone = "Europe/London"; hardware.trackpoint.enable = true; services.hardware.bolt.enable = true; + powerManagement.cpuFreqGovernor = lib.mkForce "ondemand"; + hardware.video.hidpi.enable = lib.mkDefault true; + services.fprintd = { enable = true; }; diff --git a/nixos/boxes/foureighty/hardware-configuration.nix b/nixos/boxes/foureighty/hardware-configuration.nix index b7c0df54..2377cdaa 100644 --- a/nixos/boxes/foureighty/hardware-configuration.nix +++ b/nixos/boxes/foureighty/hardware-configuration.nix @@ -26,9 +26,6 @@ swapDevices = [ ]; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.video.hidpi.enable = lib.mkDefault true; - nix.maxJobs = 2; nix.buildCores = 6; } diff --git a/nixos/boxes/skinnyv/default.nix b/nixos/boxes/skinnyv/default.nix index 23845807..0283b78e 100644 --- a/nixos/boxes/skinnyv/default.nix +++ b/nixos/boxes/skinnyv/default.nix @@ -21,5 +21,6 @@ boot.loader.efi.canTouchEfiVariables = true; time.timeZone = "Europe/London"; + services.thermald.enable = true; fonts.fontconfig.enable = true; } diff --git a/nixos/common-hardware.nix b/nixos/common-hardware.nix index 4953481f..672c0fca 100644 --- a/nixos/common-hardware.nix +++ b/nixos/common-hardware.nix @@ -55,6 +55,5 @@ }; powerManagement.enable = (lib.mkForce true); - powerManagement.cpuFreqGovernor = (lib.mkForce null); powerManagement.powertop.enable = true; }