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: {
type = "disk";
device = "/dev/${disk}";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid1";
disko.devices = {
disk = {
sda = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
});
disko.devices.mdadm = {
raid1 = {
type = "mdadm";
level = 1;
content = {
type = "luks";
name = "crypted";
sdb = {
type = "disk";
device = "/dev/sdb";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
type = "gpt";
partitions = {
Storage = {
type = "luks";
name = "storage-crypted";
settings.allowDiscards = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/Storage";
};
};
};
};
};
}
};
};
}