nix-config/devices/ellaca/disko.nix
2024-05-06 23:40:01 +02:00

96 lines
2.2 KiB
Nix

{
disko.devices = {
disk = {
ssd0 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
efi = {
size = "1G";
type = "EF00";
priority = 0;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
end = "-16G";
content = {
type = "zfs";
pool = "zroot";
};
};
swap = {
size = "100%";
content = {
type = "swap";
resumeDevice = true;
};
};
};
};
};
hdd0 = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
store = {
size = "100%";
content = {
type = "zfs";
pool = "zstore";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
canmount = "on";
"com.sun:auto-snapshot" = "false";
};
mountpoint = "/";
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
zstore = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
canmount = "on";
"com.sun:auto-snapshot" = "false";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
persist = {
type = "zfs_fs";
mountpoint = "/persist/ext";
};
};
};
};
};
}