mochi/nixos/profiles/disko-nixos.nix

85 lines
1.9 KiB
Nix
Raw Normal View History

2024-06-24 13:00:06 -05:00
{ disks ? [ "/dev/sda" ], ... }: {
disko.devices = {
disk = {
main = {
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "gpt";
partitions = {
ESP = {
size = "1024M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "zroot";
};
};
};
};
};
2024-06-24 14:15:52 -05:00
};
2024-06-24 13:00:06 -05:00
zpool = {
zroot = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
"com.sun:auto-snapshot" = "false";
mountpoint = "none";
acltype = "posixacl";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
2024-06-24 14:15:52 -05:00
options = {
2024-06-24 14:22:54 -05:00
ashift = "12";
2024-06-24 14:15:52 -05:00
zfsutil = "";
};
2024-06-24 13:00:06 -05:00
};
nix = {
type = "zfs_fs";
2024-06-24 14:15:52 -05:00
mountpoint = "/nix";
options = {
2024-06-24 14:22:54 -05:00
ashift = "12";
2024-06-24 14:15:52 -05:00
zfsutil = "";
};
2024-06-24 13:00:06 -05:00
};
var = {
type = "zfs_fs";
mountpoint = "/var";
2024-06-24 14:15:52 -05:00
options = {
2024-06-24 14:22:54 -05:00
ashift = "12";
2024-06-24 14:15:52 -05:00
zfsutil = "";
};
2024-06-24 13:00:06 -05:00
};
home = {
type = "zfs_fs";
mountpoint = "/home";
2024-06-24 14:15:52 -05:00
options = {
2024-06-24 14:22:54 -05:00
ashift = "12";
2024-06-24 14:15:52 -05:00
"com.sun:auto-snapshot" = "true";
zfsutil = "";
};
2024-06-24 13:00:06 -05:00
};
};
};
};
};
}