nixos-config/machines/sayuri/hardware-configuration.nix
2020-12-13 17:57:08 +01:00

54 lines
1.3 KiB
Nix

{ config, lib, modulesPath, pkgs, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader.grub.device = "/dev/disk/by-id/ata-MTFDDAK256TBN-1AR15ABHA_UFZMQ01ZR50NMM";
initrd = {
availableKernelModules = [ "ahci" "ehci_pci" "sd_mod" "usb_storage" "usbhid" "xhci_pci" ];
kernelModules = [ "dm-snapshot" ];
luks.devices = {
root = {
name = "root";
device = "/dev/disk/by-uuid/d7e4d213-8a13-4059-a011-0f68081e86d8";
preLVM = true;
allowDiscards = true;
};
};
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/024e31ab-aa98-4070-95be-7980043541ac";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/c5bde64b-c629-438d-a78b-c4341796dae9";
fsType = "ext2";
};
"/data" = {
device = "/dev/mapper/data";
encrypted = {
label = "data";
enable = true;
blkDev = "/dev/disk/by-uuid/576088d4-9aae-4159-a028-feadb2621a1a";
keyFile = "/mnt-root" + toString <secrets/luks-data>;
};
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/78f5277f-a6e5-4297-99cd-d3ea5de5317e"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}