68 lines
1.5 KiB
Nix
68 lines
1.5 KiB
Nix
# disko.nix – Root-on-ZFS (rpool) + Daten-Pool (tank)
|
||
{ disks, ... }:
|
||
|
||
{
|
||
disko.devices = {
|
||
disk.main = {
|
||
device = builtins.elemAt disks 0;
|
||
type = "disk";
|
||
|
||
content = {
|
||
type = "gpt";
|
||
partitions = {
|
||
ESP = {
|
||
size = "512M"; type = "EF00";
|
||
content = {
|
||
type = "filesystem";
|
||
format = "vfat";
|
||
extraArgs = [ "-F32" ];
|
||
mountpoint = "/boot";
|
||
};
|
||
};
|
||
rpool = {
|
||
size = "60G"; type = "BF00";
|
||
content = { type = "zfs"; pool = "rpool"; };
|
||
};
|
||
tank = {
|
||
type = "BF00";
|
||
content = { type = "zfs"; pool = "tank"; };
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
zpool.rpool = {
|
||
type = "zpool";
|
||
options = { ashift = "12"; autotrim = "on"; };
|
||
datasets = {
|
||
root = {
|
||
type = "zfs_fs";
|
||
mountpoint = "/";
|
||
options.compression = "zstd";
|
||
};
|
||
nix = {
|
||
type = "zfs_fs";
|
||
mountpoint = "legacy";
|
||
options.compression = "zstd";
|
||
};
|
||
home = {
|
||
type = "zfs_fs";
|
||
mountpoint = "legacy";
|
||
options.compression = "zstd";
|
||
};
|
||
};
|
||
};
|
||
|
||
zpool.tank = {
|
||
type = "zpool";
|
||
options = { ashift = "12"; autotrim = "on"; };
|
||
datasets.media = {
|
||
type = "zfs_fs";
|
||
mountpoint = "/tank";
|
||
options.compression = "zstd";
|
||
};
|
||
};
|
||
};
|
||
}
|
||
|