thelioMira: initial hardware commit
This commit is contained in:
parent
82768c9c00
commit
92f4dc765e
74
hardware/system76_thelioMira.nix
Normal file
74
hardware/system76_thelioMira.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue