sayuri: Reinstall on NVMe ssd

This commit is contained in:
Simon Bruder 2021-05-04 23:15:05 +02:00
parent 9bbc4a2f7a
commit d3ec5f4ba1
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -6,16 +6,19 @@
]; ];
boot = { boot = {
# async trim on btrfs requires kernel 5.6+
# TODO: Remove with kernel 5.6+ in stable
kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
loader.grub.device = "/dev/disk/by-id/ata-MTFDDAK256TBN-1AR15ABHA_UFZMQ01ZR50NMM"; loader.grub.device = "/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_250GB_S4EUNJ0N412342P";
initrd = { initrd = {
availableKernelModules = [ "aesni_intel" "ahci" "ehci_pci" "sd_mod" "usb_storage" "usbhid" "xhci_pci" ]; availableKernelModules = [ "aesni_intel" "ahci" "ehci_pci" "nvme" "sd_mod" "sr_mod" "usb_storage" "usbhid" "xhci_pci" ];
kernelModules = [ "dm-snapshot" ]; kernelModules = [ "dm-snapshot" ];
luks.devices = { luks.devices = {
root = { root = {
name = "root"; name = "root";
device = "/dev/disk/by-uuid/d7e4d213-8a13-4059-a011-0f68081e86d8"; device = "/dev/disk/by-uuid/1607bb2a-329b-4252-b11a-b43eb6b7bf0c";
preLVM = true; preLVM = true;
allowDiscards = true; allowDiscards = true;
}; };
@ -25,29 +28,43 @@
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/024e31ab-aa98-4070-95be-7980043541ac"; device = "/dev/disk/by-uuid/9e6b279e-6995-44da-b673-21b9e23a5278";
fsType = "ext4"; fsType = "btrfs";
options = [ "discard" "noatime" ]; options = [ "discard=async" "noatime" "compress=zstd" ];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/c5bde64b-c629-438d-a78b-c4341796dae9"; device = "/dev/disk/by-uuid/7b8b75d2-f779-4a49-b09d-b2a1bbd801bb";
fsType = "ext2"; fsType = "ext2";
}; };
"/data" = { "/data" = {
device = "/dev/mapper/data"; device = "/dev/mapper/data";
fsType = "btrfs";
options = [ "compress=zstd" ];
encrypted = { encrypted = {
label = "data"; label = "data";
enable = true; enable = true;
blkDev = "/dev/disk/by-uuid/576088d4-9aae-4159-a028-feadb2621a1a"; blkDev = "/dev/disk/by-uuid/7f4ba71e-3aca-4294-b37f-49f37b584dbd";
keyFile = "/mnt-root/root/luks-data";
};
};
"/data/ssd" = {
device = "/dev/mapper/data-ssd";
fsType = "btrfs";
options = [ "discard=async" "noatime" "compress=zstd" ];
encrypted = {
label = "data-ssd";
enable = true;
blkDev = "/dev/disk/by-uuid/41baa168-7fa0-4eb3-b314-50766ddf126d";
keyFile = "/mnt-root/root/luks-data"; keyFile = "/mnt-root/root/luks-data";
}; };
}; };
}; };
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-uuid/78f5277f-a6e5-4297-99cd-d3ea5de5317e"; } { device = "/dev/disk/by-uuid/2774d182-ddc9-4d79-886e-995fcd60a88a"; }
]; ];
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";