nixos-config/machines/sayuri/hardware-configuration.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

2020-12-06 10:53:40 +01:00
{ config, lib, modulesPath, pkgs, ... }:
2020-10-17 23:18:22 +02:00
{
2020-12-06 10:53:40 +01:00
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
2020-10-17 23:18:22 +02:00
2020-12-06 10:53:40 +01:00
boot = {
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader.grub.device = "/dev/disk/by-id/ata-MTFDDAK256TBN-1AR15ABHA_UFZMQ01ZR50NMM";
2020-12-06 10:53:40 +01:00
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;
};
};
2020-12-06 10:53:40 +01:00
};
};
2020-10-17 23:18:22 +02:00
2020-12-06 10:53:40 +01:00
fileSystems = {
"/" = {
2020-10-17 23:18:22 +02:00
device = "/dev/disk/by-uuid/024e31ab-aa98-4070-95be-7980043541ac";
fsType = "ext4";
};
2020-12-06 10:53:40 +01:00
"/boot" = {
2020-10-17 23:18:22 +02:00
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/data_luks_key;
};
};
2020-12-06 10:53:40 +01:00
};
2020-10-17 23:18:22 +02:00
2020-12-06 10:53:40 +01:00
swapDevices = [
{ device = "/dev/disk/by-uuid/78f5277f-a6e5-4297-99cd-d3ea5de5317e"; }
];
2020-10-17 23:18:22 +02:00
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}