2024-04-28 15:54:53 +00:00
|
|
|
# Surface Pro 9
|
2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
modulesPath,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
|
2024-06-02 18:16:44 +00:00
|
|
|
# Format and configure the disk using Disko
|
|
|
|
host.base.disko = {
|
|
|
|
enable = false;
|
|
|
|
primaryDisk = "nvme0n1";
|
|
|
|
enableTPM = true;
|
|
|
|
swapFile = {
|
|
|
|
enable = true;
|
|
|
|
size = "16G";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
boot = {
|
|
|
|
initrd = {
|
2024-06-01 15:16:19 +00:00
|
|
|
# Enable systemd for TPM auto-unlocking
|
|
|
|
systemd.enable = true;
|
2024-06-02 18:16:44 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
availableKernelModules = [
|
|
|
|
"surface_aggregator"
|
|
|
|
"surface_aggregator_registry"
|
|
|
|
"surface_aggregator_hub"
|
|
|
|
"surface_hid_core"
|
|
|
|
"hid_multitouch"
|
|
|
|
"8250_dw"
|
|
|
|
"intel_lpss"
|
|
|
|
"intel_lpss_pci"
|
|
|
|
"tpm_crb"
|
|
|
|
"xhci_pci"
|
|
|
|
"thunderbolt"
|
|
|
|
"nvme"
|
|
|
|
"usb_storage"
|
|
|
|
"sd_mod"
|
|
|
|
"surface_kbd"
|
|
|
|
"pinctrl_tigerlake"
|
|
|
|
];
|
|
|
|
kernelModules = [
|
|
|
|
"tpm_crb"
|
|
|
|
"surface_aggregator"
|
|
|
|
"surface_aggregator_registry"
|
|
|
|
"surface_aggregator_hub"
|
|
|
|
"surface_hid_core"
|
|
|
|
"surface_hid"
|
|
|
|
"hid_multitouch"
|
|
|
|
"8250_dw"
|
|
|
|
"intel_lpss"
|
|
|
|
"intel_lpss_pci"
|
|
|
|
"surface_kbd"
|
|
|
|
"pinctrl_tigerlake"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
kernelModules = [
|
|
|
|
"kvm-intel"
|
|
|
|
"tpm_crb"
|
|
|
|
"surface_aggregator"
|
|
|
|
"surface_aggregator_registry"
|
|
|
|
"surface_aggregator_hub"
|
|
|
|
"surface_hid_core"
|
|
|
|
"surface_hid"
|
|
|
|
"hid_multitouch"
|
|
|
|
"8250_dw"
|
|
|
|
"intel_lpss"
|
|
|
|
"intel_lpss_pci"
|
|
|
|
"surface_kbd"
|
|
|
|
"pinctrl_tigerlake"
|
|
|
|
];
|
|
|
|
extraModulePackages = [ ];
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
useDHCP = lib.mkDefault true;
|
|
|
|
hostName = "Khanda";
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
|
|
|
# Install/configure additional drivers, particularly for touch
|
|
|
|
environment.systemPackages = with pkgs; [ libwacom-surface ];
|
|
|
|
microsoft-surface = {
|
|
|
|
ipts.enable = true;
|
|
|
|
surface-control.enable = true;
|
|
|
|
};
|
|
|
|
|
2024-06-02 18:16:44 +00:00
|
|
|
# Uncomment this to use the default kernel and skip rebuilding the kernel
|
2024-05-07 22:02:59 +00:00
|
|
|
# boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
2024-04-23 18:46:17 +00:00
|
|
|
}
|