2022-12-31 05:52:38 -05:00
|
|
|
{ lib, pkgs, ... }:
|
2022-12-04 22:01:37 -05:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkDefault;
|
|
|
|
|
|
|
|
in {
|
2022-01-25 01:57:07 -05:00
|
|
|
imports = [
|
2023-01-09 21:22:06 -05:00
|
|
|
./common
|
|
|
|
./surface-go/firmware/ath10k
|
2022-01-25 01:57:07 -05:00
|
|
|
];
|
|
|
|
|
2022-12-04 23:51:33 -05:00
|
|
|
microsoft-surface.kernelVersion = mkDefault "6.0.11";
|
2022-12-04 23:32:25 -05:00
|
|
|
|
2022-12-04 22:01:37 -05:00
|
|
|
boot.extraModprobeConfig = mkDefault ''
|
2022-01-25 01:57:07 -05:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2023-01-09 21:35:48 -05:00
|
|
|
# Seems to be required to properly enable S0ix "Modern Standby":
|
2022-01-25 01:57:07 -05:00
|
|
|
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
|
|
|
|
|
|
|
# NOTE: Check the README before enabling TLP:
|
2022-12-04 22:01:37 -05:00
|
|
|
services.tlp.enable = mkDefault false;
|
2022-01-25 01:57:07 -05:00
|
|
|
|
2022-01-25 01:57:50 -05:00
|
|
|
# i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364
|
2022-12-04 22:01:37 -05:00
|
|
|
hardware.enableRedistributableFirmware = mkDefault true;
|
|
|
|
hardware.sensor.iio.enable = mkDefault true;
|
2021-02-02 19:13:14 -05:00
|
|
|
|
2022-12-04 22:01:37 -05:00
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.surface-control
|
|
|
|
];
|
2021-03-17 15:46:55 -04:00
|
|
|
users.groups.surface-control = { };
|
2022-12-04 22:01:37 -05:00
|
|
|
services.udev.packages = [
|
|
|
|
pkgs.surface-control
|
|
|
|
];
|
|
|
|
|
2021-05-27 14:41:26 -04:00
|
|
|
systemd.services.iptsd = {
|
|
|
|
description = "IPTSD";
|
|
|
|
script = "${pkgs.iptsd}/bin/iptsd";
|
2022-12-04 22:01:37 -05:00
|
|
|
wantedBy = [
|
|
|
|
"multi-user.target"
|
|
|
|
];
|
2021-05-27 14:41:26 -04:00
|
|
|
};
|
2021-01-23 01:36:37 -05:00
|
|
|
}
|