refactor disko on chungus

This commit is contained in:
Ingolf Wagner 2024-03-03 20:28:07 +01:00
parent b9b71ff821
commit 29d2d1e7fd
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -25,14 +25,11 @@ in
type = "disk"; type = "disk";
device = "/dev/nvme0n1"; device = "/dev/nvme0n1";
content = { content = {
type = "table"; type = "gpt";
format = "gpt"; partitions = {
partitions = [ boot = {
{ priority = 1;
name = "ESP"; size = "500M";
start = "0";
end = "500MiB";
bootable = true;
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
@ -41,11 +38,10 @@ in
"defaults" "defaults"
]; ];
}; };
} };
{ root = {
name = "zfs"; priority = 100;
start = "500MiB"; size = "100%";
end = "100%";
content = { content = {
type = "luks"; type = "luks";
name = "root"; name = "root";
@ -54,8 +50,8 @@ in
pool = "zroot"; pool = "zroot";
}; };
}; };
} };
]; };
}; };
}; };
} // builtins.mapAttrs } // builtins.mapAttrs
@ -63,13 +59,10 @@ in
type = "disk"; type = "disk";
device = device_path; device = device_path;
content = { content = {
type = "table"; type = "gpt";
format = "gpt"; partitions = {
partitions = [ zfs = {
{ size = "100%";
name = "zfs";
start = "0";
end = "100%";
content = { content = {
type = "luks"; type = "luks";
name = "raid_${name}"; name = "raid_${name}";
@ -78,8 +71,8 @@ in
pool = "zraid"; pool = "zraid";
}; };
}; };
} };
]; };
}; };
} }
) )
@ -109,7 +102,7 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
}; };
}; };
}; };
@ -130,9 +123,9 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
"com.sun:auto-snapshot:weekly" = true; "com.sun:auto-snapshot:weekly" = toString true;
"com.sun:auto-snapshot:monthly" = true; "com.sun:auto-snapshot:monthly" = toString true;
}; };
}; };
"legacy" = { "legacy" = {
@ -141,7 +134,7 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:monthly" = true; "com.sun:auto-snapshot:monthly" = toString true;
}; };
}; };
"borg" = { "borg" = {
@ -150,9 +143,9 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
"com.sun:auto-snapshot:weekly" = true; "com.sun:auto-snapshot:weekly" = toString true;
"com.sun:auto-snapshot:monthly" = true; "com.sun:auto-snapshot:monthly" = toString true;
}; };
}; };
"syncthing" = { "syncthing" = {
@ -161,9 +154,9 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
"com.sun:auto-snapshot:weekly" = true; "com.sun:auto-snapshot:weekly" = toString true;
"com.sun:auto-snapshot:monthly" = true; "com.sun:auto-snapshot:monthly" = toString true;
}; };
}; };
"mirror" = { "mirror" = {
@ -172,9 +165,9 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
"com.sun:auto-snapshot:weekly" = true; "com.sun:auto-snapshot:weekly" = toString true;
"com.sun:auto-snapshot:montly" = true; "com.sun:auto-snapshot:montly" = toString true;
}; };
}; };
"services" = { "services" = {
@ -183,9 +176,9 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
"com.sun:auto-snapshot:weekly" = true; "com.sun:auto-snapshot:weekly" = toString true;
"com.sun:auto-snapshot:montly" = true; "com.sun:auto-snapshot:montly" = toString true;
}; };
}; };
"container" = { "container" = {
@ -203,8 +196,8 @@ in
options = { options = {
mountpoint = "legacy"; mountpoint = "legacy";
compression = "lz4"; compression = "lz4";
"com.sun:auto-snapshot:daily" = true; "com.sun:auto-snapshot:daily" = toString true;
"com.sun:auto-snapshot:weekly" = true; "com.sun:auto-snapshot:weekly" = toString true;
}; };
}; };
"robi/media" = { "robi/media" = {