This commit is contained in:
Xory 2026-01-03 17:43:42 +02:00
parent 8c9eed18e6
commit b458b67238
83 changed files with 1115 additions and 5026 deletions

View file

@ -0,0 +1,88 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
# Critical for Samsung NVMe longevity/performance
settings.allowDiscards = true;
content = {
type = "zfs";
pool = "zroot";
};
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
options = {
ashift = "12";
autotrim = "on";
};
rootFsOptions = {
acltype = "posixacl";
xattr = "sa";
dnodesize = "auto";
compression = "zstd";
normalization = "formD";
relatime = "on";
canmount = "off";
"com.sun:auto-snapshot" = "false";
};
datasets = {
# Ephemeral root (rolls back to blank on boot)
"root" = {
type = "zfs_fs";
mountpoint = "/";
options.mountpoint = "legacy";
postCreateHook = "zfs snapshot zroot/root@blank";
};
# Nix store
"nix" = {
type = "zfs_fs";
mountpoint = "/nix";
options.mountpoint = "legacy";
options."com.sun:auto-snapshot" = "false";
};
# Persistent data
"persist" = {
type = "zfs_fs";
mountpoint = "/persist";
options.mountpoint = "legacy";
};
# Home directories
"home" = {
type = "zfs_fs";
mountpoint = "/home";
options.mountpoint = "legacy";
};
};
};
};
};
}