73 lines
1.7 KiB
Nix
73 lines
1.7 KiB
Nix
|
{
|
||
|
disko.devices = {
|
||
|
disk = {
|
||
|
main = {
|
||
|
device = "/dev/sda";
|
||
|
type = "disk";
|
||
|
content = {
|
||
|
type = "gpt";
|
||
|
partitions = {
|
||
|
ESP = {
|
||
|
name = "boot";
|
||
|
type = "EF00";
|
||
|
size = "512M";
|
||
|
content = {
|
||
|
type = "filesystem";
|
||
|
format = "vfat";
|
||
|
mountpoint = "/boot";
|
||
|
mountOptions = [ "umask=0077" ];
|
||
|
};
|
||
|
};
|
||
|
zfs = {
|
||
|
size = "100%";
|
||
|
content = {
|
||
|
type = "zfs";
|
||
|
pool = "zroot";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
zpool = {
|
||
|
zroot = {
|
||
|
type = "zpool";
|
||
|
rootFsOptions = {
|
||
|
canmount = "off";
|
||
|
compression = "zstd";
|
||
|
};
|
||
|
datasets = {
|
||
|
root = {
|
||
|
type = "zfs_fs";
|
||
|
mountpoint = "/";
|
||
|
options.mountpoint = "legacy";
|
||
|
postCreateHook = "zfs snapshot zroot/root@blank";
|
||
|
};
|
||
|
nix = {
|
||
|
type = "zfs_fs";
|
||
|
mountpoint = "/nix";
|
||
|
options.mountpoint = "legacy";
|
||
|
};
|
||
|
persist = {
|
||
|
type = "zfs_fs";
|
||
|
options = {
|
||
|
mountpoint = "legacy";
|
||
|
"com.sun:auto-snapshot" = "true";
|
||
|
};
|
||
|
mountpoint = "/persist";
|
||
|
};
|
||
|
home = {
|
||
|
type = "zfs_fs";
|
||
|
options = {
|
||
|
mountpoint = "legacy";
|
||
|
"com.sun:auto-snapshot" = "true";
|
||
|
};
|
||
|
mountpoint = "/home";
|
||
|
postCreateHook = "zfs snapshot zroot/home@blank";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|