Extract _actually_ common code out of microsoft/surface/default.nix
This commit is contained in:
parent
5e6d5f2d88
commit
51122e95a1
|
@ -1,7 +1,22 @@
|
||||||
{ ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
inherit (lib) mkDefault;
|
||||||
|
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./kernel
|
./kernel
|
||||||
];
|
];
|
||||||
|
|
||||||
|
microsoft-surface.kernelVersion = mkDefault "6.0.11";
|
||||||
|
|
||||||
|
# Seems to be required to properly enable S0ix "Modern Standby":
|
||||||
|
boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ];
|
||||||
|
|
||||||
|
# NOTE: Check the README before enabling TLP:
|
||||||
|
services.tlp.enable = mkDefault false;
|
||||||
|
|
||||||
|
# i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364
|
||||||
|
hardware.enableRedistributableFirmware = mkDefault true;
|
||||||
|
hardware.sensor.iio.enable = mkDefault true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,6 @@ in {
|
||||||
./surface-go/firmware/ath10k
|
./surface-go/firmware/ath10k
|
||||||
];
|
];
|
||||||
|
|
||||||
microsoft-surface.kernelVersion = mkDefault "6.0.11";
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = mkDefault ''
|
boot.extraModprobeConfig = mkDefault ''
|
||||||
options i915 enable_fbc=1 enable_rc6=1 modeset=1
|
options i915 enable_fbc=1 enable_rc6=1 modeset=1
|
||||||
options snd_hda_intel power_save=1
|
options snd_hda_intel power_save=1
|
||||||
|
@ -19,16 +17,6 @@ in {
|
||||||
options iwldvm force_cam=N
|
options iwldvm force_cam=N
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Seems to be required to properly enable S0ix "Modern Standby":
|
|
||||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
|
||||||
|
|
||||||
# NOTE: Check the README before enabling TLP:
|
|
||||||
services.tlp.enable = mkDefault false;
|
|
||||||
|
|
||||||
# i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364
|
|
||||||
hardware.enableRedistributableFirmware = mkDefault true;
|
|
||||||
hardware.sensor.iio.enable = mkDefault true;
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.surface-control
|
pkgs.surface-control
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue