disko/example/zfs.nix
lassulus dcb0c42857 reimplement disko using the nixos type system
This should make the code cleaner, more robust and errors should be
clearer. we also changed the configuration format a bit.
2022-09-02 11:14:58 +02:00

58 lines
1.2 KiB
Nix

{
disk = {
vdb = {
type = "disk";
device = "/dev/vdb";
content = {
type = "zfs";
pool = "zroot";
};
};
vdc = {
type = "disk";
device = "/dev/vdc";
content = {
type = "zfs";
pool = "zroot";
};
};
};
zpool = {
zroot = {
type = "zpool";
mode = "mirror";
rootFsOptions = {
compression = "lz4";
"com.sun:auto-snapshot" = "false";
};
mountpoint = "/";
datasets = {
zfs_fs = {
zfs_type = "filesystem";
mountpoint = "/zfs_fs";
options."com.sun:auto-snapshot" = "true";
};
zfs_unmounted_fs = {
zfs_type = "filesystem";
options.mountpoint = "none";
};
zfs_legacy_fs = {
zfs_type = "filesystem";
options.mountpoint = "legacy";
mountpoint = "/zfs_legacy_fs";
};
zfs_testvolume = {
zfs_type = "volume";
size = "10M";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/ext4onzfs";
};
};
};
};
};
}