got a new encrypted btrfs raid yay

This commit is contained in:
Lyn 2024-11-09 21:58:53 +01:00
parent 73ed8b7f1c
commit a2c3512a38

View file

@ -18,9 +18,22 @@
boot.extraModulePackages = []; boot.extraModulePackages = [];
boot.initrd.systemd.enable = true; boot.initrd.systemd.enable = true;
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/db8a5cf9-c54b-4e6a-b3f9-e6323eb962a6"; boot.initrd.luks.devices = {
# doubles SSD performance because r/w queue is unnecessary here "root" = {
boot.initrd.luks.devices."root".bypassWorkqueues = true; device = "/dev/disk/by-uuid/db8a5cf9-c54b-4e6a-b3f9-e6323eb962a6";
# doubles SSD performance because r/w queue is unnecessary on SSDs
bypassWorkqueues = true;
};
"chungus_1" = {
device = "/dev/disk/by-uuid/2c02d324-df81-4c63-b1f8-16c411d1b34a/";
keyFile = "/root/raid_keyfile";
};
"chungus_2" = {
device = "/dev/disk/by-uuid/b642a13f-ddb8-4e25-b885-3eea3744a208/";
keyFile = "/root/raid_keyfile";
};
};
fileSystems."/" = { fileSystems."/" = {
device = "/dev/mapper/vg-root"; device = "/dev/mapper/vg-root";
@ -33,13 +46,18 @@
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0022" "dmask=0022" "umask=0077" "x-systemd.device-timeout=0"]; options = ["fmask=0022" "dmask=0022" "umask=0077" "x-systemd.device-timeout=0"];
}; };
fileSystems."/mnt/chungus" = {
device = "/dev/mapper/chungus_1";
fsType = "btrfs";
options = [ "defaults" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" "subvol=@" "x-systemd.device-timeout=0"];
};
swapDevices = [ swapDevices = [
{ {
device = "/dev/mapper/vg-swap"; device = "/dev/mapper/vg-swap";
options = ["x-systemd.device-timeout=0"]; options = ["x-systemd.device-timeout=0"];
} }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's