1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-16 16:09:40 +01:00
nixos-hardware/microsoft/surface/default.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-31 11:52:38 +01:00
{ lib, pkgs, ... }:
2022-12-05 04:01:37 +01:00
let
inherit (lib) mkDefault;
in {
imports = [
./common
./surface-go/firmware/ath10k
];
2022-12-05 05:51:33 +01:00
microsoft-surface.kernelVersion = mkDefault "6.0.11";
2022-12-05 04:01:37 +01:00
boot.extraModprobeConfig = 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:
2022-12-05 04:01:37 +01:00
services.tlp.enable = mkDefault false;
# i.e. needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364
2022-12-05 04:01:37 +01:00
hardware.enableRedistributableFirmware = mkDefault true;
hardware.sensor.iio.enable = mkDefault true;
2021-02-03 01:13:14 +01:00
2022-12-05 04:01:37 +01:00
environment.systemPackages = [
pkgs.surface-control
];
2021-03-17 20:46:55 +01:00
users.groups.surface-control = { };
2022-12-05 04:01:37 +01:00
services.udev.packages = [
pkgs.surface-control
];
2021-05-27 20:41:26 +02:00
systemd.services.iptsd = {
description = "IPTSD";
script = "${pkgs.iptsd}/bin/iptsd";
2022-12-05 04:01:37 +01:00
wantedBy = [
"multi-user.target"
];
2021-05-27 20:41:26 +02:00
};
}