From b9fb6c76d12b349da594a8d7022b8424ad4d6852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Jan 2022 07:57:07 +0100 Subject: [PATCH] microsoft/surface: just inline hardware_configuration Everything in nixos-hardware should be hardware configuration after all. --- microsoft/surface/default.nix | 21 ++++++++++++++++++-- microsoft/surface/hardware_configuration.nix | 17 ---------------- 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 microsoft/surface/hardware_configuration.nix diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 7b53f0d..7452c10 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,6 +1,23 @@ { config, lib, pkgs, ... }: { - imports = - [ ./kernel ./hardware_configuration.nix ./firmware/surface-go/ath10k ]; + imports = [ + ./kernel + ./firmware/surface-go/ath10k + ]; + + 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 + ''; + + 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; environment.systemPackages = with pkgs; [ surface-control ]; users.groups.surface-control = { }; diff --git a/microsoft/surface/hardware_configuration.nix b/microsoft/surface/hardware_configuration.nix deleted file mode 100644 index ba06b30..0000000 --- a/microsoft/surface/hardware_configuration.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ 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 - ''; - - 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; -}