From 3c9fdec17af0aca598d6de092b9bf24518e18978 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 16 Jan 2021 20:59:20 +0100 Subject: Use optimised kernel and CPU governor on PCs (laptops and desktops) --- system/prefect.nix | 2 +- system/settings/hardware/laptop.nix | 1 + system/settings/hardware/personal-computer.nix | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 system/settings/hardware/personal-computer.nix (limited to 'system') diff --git a/system/prefect.nix b/system/prefect.nix index c38a3fab..188dfd8f 100644 --- a/system/prefect.nix +++ b/system/prefect.nix @@ -13,6 +13,7 @@ ./settings/configuration/user.nix ./settings/hardware/audio.nix ./settings/hardware/bare-metal.nix + ./settings/hardware/personal-computer.nix ./settings/hardware/bluetooth.nix ./settings/hardware/nvme-root.nix ./settings/hardware/connman.nix @@ -79,7 +80,6 @@ ip6tables -A nixos-fw -p udp --source fd12:d04f:65d:0::/64 -j nixos-fw-accept ''; - powerManagement.cpuFreqGovernor = "schedutil"; networking = { hostName = "prefect"; }; diff --git a/system/settings/hardware/laptop.nix b/system/settings/hardware/laptop.nix index 9f752070..946dbda7 100644 --- a/system/settings/hardware/laptop.nix +++ b/system/settings/hardware/laptop.nix @@ -6,6 +6,7 @@ ./bluetooth-audio.nix ./connman.nix ./iwd.nix + ./personal-computer.nix ../user-interface.nix ]; diff --git a/system/settings/hardware/personal-computer.nix b/system/settings/hardware/personal-computer.nix new file mode 100644 index 00000000..e8574b3d --- /dev/null +++ b/system/settings/hardware/personal-computer.nix @@ -0,0 +1,6 @@ +{ config, pkgs, lib, ... }: + +{ + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; + powerManagement.cpuFreqGovernor = "schedutil"; +} -- cgit 1.4.1