nix-config/hosts/maddy/fs.nix
2024-01-27 23:21:42 +01:00

35 lines
926 B
Nix

{
config,
lib,
...
}: {
disko.devices = {
disk = {
drive = {
type = "disk";
device = "/dev/disk/by-id/${config.secrets.secrets.local.disko.drive}";
content = with lib.disko.gpt; {
type = "table";
format = "gpt";
partitions = [
(partGrub "grub" "0%" "1MiB")
(partEfi "bios" "1MiB" "512MiB")
(partLuksZfs "rpool" "rpool" "512MiB" "100%")
#(lib.attrsets.recursiveUpdate (partLuksZfs "rpool" "rpool" "17GiB" "100%") {content.extraFormatArgs = ["--pbkdf pbkdf2"];})
];
};
};
};
zpool = with lib.disko.zfs; {
rpool = mkZpool {datasets = impermanenceZfsDatasets;};
};
};
fileSystems."/state".neededForBoot = true;
fileSystems."/persist".neededForBoot = true;
boot.loader.grub.devices = [
"/dev/disk/by-id/${config.secrets.secrets.local.disko.drive}"
];
}