update disks for warsaw

This commit is contained in:
albert 2024-07-14 21:14:13 +09:00
parent 4c48afb3be
commit 07a9a1c733
Signed by: albert
GPG key ID: 3895DD267CA11BA9

View file

@ -1,38 +1,57 @@
{ lib, ... }:
{ {
disko.devices.disk = lib.genAttrs [ "sda" "sdb" ] (disk: { disko.devices = {
type = "disk"; disk = {
device = "/dev/${disk}"; sda = {
content = { type = "disk";
type = "gpt"; device = "/dev/sda";
partitions = { content = {
boot = { type = "gpt";
size = "1M"; partitions = {
type = "EF02"; # for grub MBR ESP = {
}; size = "500M";
mdadm = { type = "EF00";
size = "100%"; content = {
content = { type = "filesystem";
type = "mdraid"; format = "vfat";
name = "raid1"; mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
}; };
}; };
}; };
}; sdb = {
}); type = "disk";
disko.devices.mdadm = { device = "/dev/sdb";
raid1 = {
type = "mdadm";
level = 1;
content = {
type = "luks";
name = "crypted";
content = { content = {
type = "filesystem"; type = "gpt";
format = "ext4"; partitions = {
mountpoint = "/"; Storage = {
type = "luks";
name = "storage-crypted";
settings.allowDiscards = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/Storage";
};
};
};
}; };
}; }
}; };
}; };
} }