53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
"content-1" = {
|
|
type = "disk";
|
|
device = "$CONTENT_DISK_ID";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
mdadm = {
|
|
size = "$PARTITION_SIZE";
|
|
content = {
|
|
type = "mdraid";
|
|
name = "raid1";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
"parity-1" = {
|
|
type = "disk";
|
|
device = "$PARITY_DISK_ID";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
mdadm = {
|
|
size = "$PARTITION_SIZE";
|
|
content = {
|
|
type = "mdraid";
|
|
name = "raid1";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
mdadm = {
|
|
raid1 = {
|
|
type = "mdadm";
|
|
level = 1;
|
|
settings = {
|
|
startOptions = [ "--run" "--bitmap=internal" ];
|
|
mdadmMetadata = "1.2";
|
|
};
|
|
content = {
|
|
type = "luks";
|
|
name = "crypted-mirror";
|
|
settings.keyFile = "/etc/secrets/disks/mirror";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "xfs";
|
|
mountpoint = "/mnt/data";
|
|
};
|
|
};
|
|
};
|