disko/example/mdadm.nix

67 lines
1.4 KiB
Nix
Raw Normal View History

{
disko.devices = {
disk = {
vdb = {
type = "disk";
device = "/dev/my-disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
2023-07-21 15:28:58 +03:00
type = "EF02"; # for grub MBR
priority = 1; # Needs to be first partition
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid1";
};
};
};
};
};
vdc = {
type = "disk";
device = "/dev/my-disk2";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
2023-07-21 15:28:58 +03:00
type = "EF02"; # for grub MBR
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid1";
};
};
};
};
};
2022-08-24 17:46:36 +03:00
};
mdadm = {
raid1 = {
type = "mdadm";
level = 1;
content = {
type = "gpt";
partitions = {
primary = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
2022-08-24 17:46:36 +03:00
};
};
};
}