about summary refs log tree commit diff
path: root/modules/nixos-hardware/microsoft/surface/hardware_configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos-hardware/microsoft/surface/hardware_configuration.nix')
-rw-r--r--modules/nixos-hardware/microsoft/surface/hardware_configuration.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/nixos-hardware/microsoft/surface/hardware_configuration.nix b/modules/nixos-hardware/microsoft/surface/hardware_configuration.nix
new file mode 100644
index 000000000000..2053b01acd49
--- /dev/null
+++ b/modules/nixos-hardware/microsoft/surface/hardware_configuration.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, ... }:
+{
+  boot.extraModprobeConfig = lib.mkDefault ''
+    options i915 enable_fbc=1 enable_rc6=1 modeset=1
+    options snd_hda_intel power_save=1
+    options snd_ac97_codec power_save=1
+    options iwlwifi power_save=Y
+    options iwldvm force_cam=N
+    options ath10k_core skip_otp=Y
+  '';
+
+  boot.kernelParams = [ "mem_sleep_default=deep" ];
+
+  # NOTE: Check the README before enabling TLP:
+  services.tlp.enable = lib.mkDefault false;
+
+  hardware.sensor.iio.enable = lib.mkDefault true;
+}