2023-08-30 14:25:52 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
m2-ssd = {
|
|
|
|
type = "disk";
|
2023-08-30 20:18:26 +02:00
|
|
|
device = "/dev/disk/by-id/${config.secrets.secrets.local.disko.m2-ssd}";
|
2023-08-30 14:25:52 +02:00
|
|
|
content = with lib.disko.gpt; {
|
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
2023-10-10 21:01:12 +02:00
|
|
|
(partEfiBoot "boot" "0%" "2GiB")
|
|
|
|
(partSwap "swap" "2GiB" "18GiB")
|
|
|
|
(partLuksZfs "rpool" "rpool" "18GiB" "100%")
|
2023-08-30 14:25:52 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
sata-hdd = {
|
|
|
|
type = "disk";
|
2023-08-30 20:18:26 +02:00
|
|
|
device = "/dev/disk/by-id/${config.secrets.secrets.local.disko.sata-hdd}";
|
2023-08-30 14:25:52 +02:00
|
|
|
content = with lib.disko.gpt; {
|
|
|
|
type = "table";
|
|
|
|
format = "gpt";
|
|
|
|
partitions = [
|
2023-08-31 22:34:22 +02:00
|
|
|
(partLuksZfs "panzer" "panzer" "0%" "100%")
|
2023-08-30 14:25:52 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
zpool = with lib.disko.zfs; {
|
|
|
|
rpool = defaultZpoolOptions // {datasets = defaultZfsDatasets;};
|
2023-10-11 20:54:56 +02:00
|
|
|
panzer =
|
|
|
|
defaultZpoolOptions
|
|
|
|
// {
|
|
|
|
datasets = {
|
|
|
|
"local" = unmountable;
|
|
|
|
"local/state" = filesystem "/panzer/state";
|
|
|
|
};
|
|
|
|
};
|
2023-08-30 14:25:52 +02:00
|
|
|
};
|
|
|
|
};
|
2023-10-11 20:54:56 +02:00
|
|
|
fileSystems."/state".neededForBoot = true;
|
|
|
|
fileSystems."/panzer/state".neededForBoot = true;
|
2023-09-01 20:07:03 +02:00
|
|
|
boot.initrd.luks.devices.enc-rpool.allowDiscards = true;
|
2023-10-11 20:54:56 +02:00
|
|
|
boot.initrd.luks.devices.enc-panzer.allowDiscards = true;
|
2023-08-30 14:25:52 +02:00
|
|
|
}
|