57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
boot = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
zfs = {
|
|
size = "100%";
|
|
content = {
|
|
type = "zfs";
|
|
pool = "tank";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
zpool = {
|
|
tank = {
|
|
type = "zpool";
|
|
rootFsOptions = {
|
|
compression = "zstd";
|
|
};
|
|
mountpoint = null;
|
|
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^tank@blank$' || zfs snapshot -r tank@blank && zfs holds -r tank@blank";
|
|
|
|
datasets = {
|
|
root = {
|
|
type = "zfs_fs";
|
|
mountpoint = "/";
|
|
};
|
|
nix = {
|
|
type = "zfs_fs";
|
|
mountpoint = "/nix";
|
|
};
|
|
persist = {
|
|
type = "zfs_fs";
|
|
mountpoint = "/persist";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|