summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2021-01-16 20:59:20 +0100
committerAlan Pearce2021-01-16 20:59:20 +0100
commit3c9fdec17af0aca598d6de092b9bf24518e18978 (patch)
tree2337c6fdc66069eb7a2738c4843acf6069ac5e14 /system
parentd48fe99a36fc5eae24949a451aa4534c1d883eea (diff)
downloadnixfiles-3c9fdec17af0aca598d6de092b9bf24518e18978.tar.lz
nixfiles-3c9fdec17af0aca598d6de092b9bf24518e18978.tar.zst
nixfiles-3c9fdec17af0aca598d6de092b9bf24518e18978.zip
Use optimised kernel and CPU governor on PCs (laptops and desktops)
Diffstat (limited to 'system')
-rw-r--r--system/prefect.nix2
-rw-r--r--system/settings/hardware/laptop.nix1
-rw-r--r--system/settings/hardware/personal-computer.nix6
3 files changed, 8 insertions, 1 deletions
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";
+}