mochi/nixos/profiles/disko-nixos.nix

74 lines
1.6 KiB
Nix
Raw Permalink 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";
};
2024-06-26 10:32:57 -05:00
mountOptions = [
"ashift=12"
];
2024-06-24 13:00:06 -05:00
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
2024-06-24 14:15:52 -05:00
mountpoint = "/nix";
2024-06-24 13:00:06 -05:00
};
var = {
type = "zfs_fs";
mountpoint = "/var";
};
home = {
type = "zfs_fs";
mountpoint = "/home";
2024-06-26 10:27:20 -05:00
options = {
2024-06-24 14:15:52 -05:00
"com.sun:auto-snapshot" = "true";
};
2024-06-24 13:00:06 -05:00
};
};
};
};
};
}