thelioMira: initial hardware commit

This commit is contained in:
Serĉanto de Scio 2024-05-22 21:44:04 +10:00
parent 82768c9c00
commit 92f4dc765e
Signed by: sercanto
GPG key ID: A4122FF3971B6865

View file

@ -0,0 +1,74 @@
# Hardware configuration file for the System76 Thelio Mira
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [<nixpkgs/nixos/modules/installer/scan/not-detected.nix>];
boot = {
initrd = {
availableKernelModules = [
"ahci"
"nvme" # NVMe drives (really fast SSDs)
"sd_mod" # SCSI disk support
"usb_storage" # USB Mass Storage support
"usbhid"
"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;
};
"cryptstore" = {
device = "/dev/disk/by-label/cryptstore";
allowDiscards = true;
preLVM = true;
};
};
};
};
kernelModules = ["kvm-intel"]; # Enable kvm for libvirtd
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
"/nix" = {
device = "/dev/disk/by-label/nixStore";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/677E-FD28";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/dev/disk/by-label/swap";
discardPolicy = "both";
}
];
networking.useDHCP = lib.mkDefault true;
nix.settings.max-jobs = lib.mkDefault 12;
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;
};
};
}