diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 7b53f0d..56dfd07 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,6 +1,25 @@ { 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; + + # i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364 + hardware.enableRedistributableFirmware = lib.mkDefault true; + 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; -}