mirror of
https://github.com/nix-community/disko
synced 2024-11-14 16:17:06 +00:00
da8f49246c
The alternative would be to do this automatically if format=="vfat" and mountpoint=="/boot", but it's better to be upfront about this. Fixes #527
117 lines
2.5 KiB
Nix
117 lines
2.5 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
x = {
|
|
type = "disk";
|
|
device = "/dev/sdx";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "64M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
zfs = {
|
|
size = "100%";
|
|
content = {
|
|
type = "zfs";
|
|
pool = "zroot";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
y = {
|
|
type = "disk";
|
|
device = "/dev/sdy";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
zfs = {
|
|
size = "100%";
|
|
content = {
|
|
type = "zfs";
|
|
pool = "zroot";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
z = {
|
|
type = "disk";
|
|
device = "/dev/sdz";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
zfs = {
|
|
size = "100%";
|
|
content = {
|
|
type = "zfs";
|
|
pool = "zroot";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
cache = {
|
|
type = "disk";
|
|
device = "/dev/vdc";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
zfs = {
|
|
size = "100%";
|
|
content = {
|
|
type = "zfs";
|
|
pool = "zroot";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
zpool = {
|
|
zroot = {
|
|
type = "zpool";
|
|
mode = {
|
|
topology = {
|
|
type = "topology";
|
|
vdev = [
|
|
{
|
|
mode = "mirror";
|
|
members = [
|
|
"x"
|
|
"y"
|
|
];
|
|
}
|
|
];
|
|
special = {
|
|
members = [ "z" ];
|
|
};
|
|
cache = [ "cache" ];
|
|
};
|
|
};
|
|
|
|
rootFsOptions = {
|
|
compression = "zstd";
|
|
"com.sun:auto-snapshot" = "false";
|
|
};
|
|
mountpoint = "/";
|
|
datasets = {
|
|
# See examples/zfs.nix for more comprehensive usage.
|
|
zfs_fs = {
|
|
type = "zfs_fs";
|
|
mountpoint = "/zfs_fs";
|
|
options."com.sun:auto-snapshot" = "true";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|