Update disk-config

This commit is contained in:
hodasemi 2025-05-15 10:54:57 +02:00
parent 1c07fd9fb9
commit 09457c8055

View file

@ -1,7 +1,38 @@
{ {
disko.devices = disko.devices = {
let disk = {
mirrorContent = { one = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
BOOT = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "500M";
type = "EF00";
content = {
type = "mdraid";
name = "boot";
};
};
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "raid1";
};
};
};
};
};
two = {
type = "disk";
device = "/dev/sdb";
content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
boot = { boot = {
@ -16,27 +47,15 @@
name = "boot"; name = "boot";
}; };
}; };
primary = { mdadm = {
size = "100%"; size = "100%";
content = { content = {
type = "lvm_pv"; type = "mdraid";
vg = "pool"; name = "raid1";
}; };
}; };
}; };
}; };
in
{
disk = {
one = {
type = "disk";
device = "/dev/nvme0n1";
content = mirrorContent;
};
two = {
type = "disk";
device = "/dev/nvme1n1";
content = mirrorContent;
}; };
}; };
mdadm = { mdadm = {
@ -51,21 +70,17 @@
mountOptions = [ "umask=0077" ]; mountOptions = [ "umask=0077" ];
}; };
}; };
}; raid1 = {
lvm_vg = { type = "mdadm";
pool = { level = 1;
type = "lvm_vg"; content = {
lvs = { type = "gpt";
root = { partitions.primary = {
size = "100%"; size = "100%";
lvm_type = "mirror";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "ext4"; format = "ext4";
mountpoint = "/"; mountpoint = "/";
mountOptions = [
"defaults"
];
}; };
}; };
}; };