tests: refactor to not use args and to use gpt type

This commit is contained in:
lassulus authored and mergify[bot] committed 2023-07-19 19:07:40 +00:00
1 parent c77e66cea1
commit 04452cfd2b
19 files changed
+221 -335

No files matched your search

+29 -44
View File
@@ -1,56 +1,44 @@
{ disks ? [ "/dev/vdb" "/dev/vdc" ], ... }: {
{
disko.devices = {
disk = {
vdb = {
type = "disk";
device = builtins.elemAt disks 0;
device = "/dev/my-disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "boot";
start = "0";
end = "1M";
part-type = "primary";
flags = [ "bios_grub" ];
}
{
name = "mdadm";
start = "1MiB";
end = "100%";
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid1";
};
}
];
};
};
};
};
vdc = {
type = "disk";
device = builtins.elemAt disks 1;
device = "/dev/my-disk2";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "boot";
start = "0";
end = "1M";
part-type = "primary";
flags = [ "bios_grub" ];
}
{
name = "mdadm";
start = "1MiB";
end = "100%";
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid1";
};
}
];
};
};
};
};
};
@@ -59,20 +47,17 @@
type = "mdadm";
level = 1;
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "primary";
start = "1MiB";
end = "100%";
type = "gpt";
partitions = {
primary = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
];
};
};
};
};
};