Lot of work done around the disk selection logic. Efficiency and reliability improved. Have to finish poslishing details.

This commit is contained in:
Raphaël Billet
2025-12-18 21:23:41 +01:00
parent 8a62db65c8
commit fb751ca89b
6 changed files with 157 additions and 195 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
"content-${i}" = {
"content-${j}" = {
type = "disk";
device = "${CONTENT_DISK_ID}";
content = {
@@ -8,12 +8,12 @@
size = "100%";
content = {
type = "luks";
name = "crypted-content-${i}";
settings.keyFile = "/etc/secrets/disks/content-disk-${i}";
name = "crypted-content-${j}";
settings.keyFile = "/etc/secrets/disks/content-disk-${j}";
content = {
type = "filesystem";
format = "xfs";
mountpoint = "/mnt/content-${i}";
mountpoint = "/mnt/content-${j}";
};
};
};
+2 -2
View File
@@ -3,7 +3,7 @@
disk = {
"content-1" = {
type = "disk";
device = "${CONTENT_DISK_1_ID}";
device = "${CONTENT_DISK_ID}";
content = {
type = "gpt";
partitions = {
@@ -20,7 +20,7 @@
};
"parity-1" = {
type = "disk";
device = "${PARITY_DISK_1_ID}";
device = "${PARITY_DISK_ID}";
content = {
type = "gpt";
partitions = {
+4 -4
View File
@@ -1,4 +1,4 @@
"parity-${i}" = {
"parity-${j}" = {
type = "disk";
device = "${PARITY_DISK_ID}";
content = {
@@ -8,12 +8,12 @@
size = "100%";
content = {
type = "luks";
name = "crypted-parity-${i}";
settings.keyFile = "/etc/secrets/disks/parity-disk-${i}";
name = "crypted-parity-${j}";
settings.keyFile = "/etc/secrets/disks/parity-disk-${j}";
content = {
type = "filesystem";
format = "xfs";
mountpoint = "/mnt/parity-${i}";
mountpoint = "/mnt/parity-${j}";
};
};
};