mio-ops/hardware/system76_lemurPro.nix

70 lines
1.7 KiB
Nix
Raw Normal View History

2023-12-05 02:48:58 +00:00
# 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;
};
#"cryptswap" = {
# device = "/dev/disk/by-label/cryptswap";
# # keyFile = "/root/swap.key"; # enable encrypted hibernation & sleep
#};
};
};
};
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";
};
};
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;
};
};
}