mirror of
https://github.com/nix-community/disko
synced 2024-11-10 14:24:27 +00:00
dcb0c42857
This should make the code cleaner, more robust and errors should be clearer. we also changed the configuration format a bit.
67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
{
|
|
disk = {
|
|
vdb = {
|
|
type = "disk";
|
|
device = "/dev/vdb";
|
|
content = {
|
|
type = "table";
|
|
format = "gpt";
|
|
partitions = [
|
|
{
|
|
type = "partition";
|
|
name = "mdadm";
|
|
start = "1MiB";
|
|
end = "100%";
|
|
content = {
|
|
type = "mdraid";
|
|
name = "raid1";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
vdc = {
|
|
type = "disk";
|
|
device = "/dev/vdc";
|
|
content = {
|
|
type = "table";
|
|
format = "gpt";
|
|
partitions = [
|
|
{
|
|
type = "partition";
|
|
name = "mdadm";
|
|
start = "1MiB";
|
|
end = "100%";
|
|
content = {
|
|
type = "mdraid";
|
|
name = "raid1";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
mdadm = {
|
|
raid1 = {
|
|
type = "mdadm";
|
|
level = 1;
|
|
content = {
|
|
type = "table";
|
|
format = "gpt";
|
|
partitions = [
|
|
{
|
|
type = "partition";
|
|
name = "primary";
|
|
start = "1MiB";
|
|
end = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/raid";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|