mio-ops/hardware/system76_lemurPro.nix

75 lines
1.8 KiB
Nix

# Hardware configuration file for the System76 Lemur Pro v12 (lemp12)
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [<nixpkgs/nixos/modules/installer/scan/not-detected.nix>];
boot = {
initrd = {
availableKernelModules = [
"thunderbolt" # USB4 and Thunderbolt 3 support
"sdhci_pci" # Secure Digital Host Controller Interface (SD cards)
"nvme" # NVMe drives (really fast SSDs)
"sd_mod" # SCSI disk support
"usb_storage" # USB Mass Storage support
"xhci_pci" # USB 3.0 (eXtensible Host Controller Interface)
];
kernelModules = ["dm-snapshot"];
luks = {
devices = {
"cryptroot" = {
device = "/dev/disk/by-label/cryptroot";
allowDiscards = true;
preLVM = true;
};
"cryptmirror" = {
device = "/dev/disk/by-label/cryptmirror";
allowDiscards = true;
preLVM = true;
};
};
};
};
kernelModules = ["kvm-intel"]; # Enable kvm for libvirtd
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
};
"/var/lib/backup" = {
device = "/dev/disk/by-label/backup";
fsType = "ext4";
};
};
swapDevices = [
{
device = "/dev/disk/by-label/swap";
discardPolicy = "both";
}
];
networking.useDHCP = lib.mkDefault true;
nix.settings.max-jobs = lib.mkDefault 4;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
system76 = {
enableAll = true; # all recommended configuration for system76 systems
power-daemon.enable = true;
};
};
}