mlaga97-nix/disko/libvirt/uefi-zfs-base.nix

60 lines
1.2 KiB
Nix

{ ... }: {
disko.devices = {
disk = {
vda = {
type = "disk";
device = "/dev/vda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "rpool";
};
};
};
};
};
};
zpool = {
rpool = {
type = "zpool";
options = {
ashift = "12";
};
rootFsOptions = {
mountpoint = "none";
compression = "zstd";
acltype = "posixacl";
xattr = "sa";
canmount = "off";
};
datasets = {
"root" = {
type = "zfs_fs";
mountpoint = "/";
postCreateHook = ''
zfs snapshot rpool/root@blank
'';
};
};
};
};
};
}