feat(nixos): span zeus root across nvme disks
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{ ... }:
|
||||
# zeus's disk layout for disko: one NVMe disk, GPT, with an EFI system
|
||||
# partition and a LUKS container holding btrfs subvolumes.
|
||||
# zeus's disk layout for disko: two NVMe disks with one EFI system partition
|
||||
# and two LUKS containers joined into one btrfs filesystem.
|
||||
# No swap partition, since swap is zram.
|
||||
# disko derives `fileSystems` and `boot.initrd.luks.devices` from this.
|
||||
{
|
||||
disko.devices.disk.main = {
|
||||
disko.devices.disk.primary = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
@@ -24,11 +24,34 @@
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
name = "cryptroot0";
|
||||
settings.allowDiscards = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
disko.devices.disk.secondary = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme1n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot1";
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
extraArgs = [
|
||||
"-f"
|
||||
"-d single"
|
||||
"-m raid1"
|
||||
"/dev/mapper/cryptroot0"
|
||||
];
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
|
||||
Reference in New Issue
Block a user