This commit is contained in:
2026-03-24 17:00:49 +01:00
commit da32fc7529
8 changed files with 772 additions and 0 deletions

118
hosts/kronos/disko.nix Normal file
View File

@@ -0,0 +1,118 @@
{ installDisk, ... }:
{
disko.devices = {
disk.main = {
type = "disk";
device = installDisk;
content = {
type = "gpt";
partitions = {
ESP = {
label = "EFI";
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
label = "cryptroot";
size = "100%";
content = {
type = "luks";
name = "cryptroot";
settings = {
allowDiscards = true;
};
content = {
type = "zfs";
pool = "rpool";
};
};
};
};
};
};
zpool.rpool = {
type = "zpool";
options = {
ashift = "12";
autotrim = "on";
};
rootFsOptions = {
acltype = "posixacl";
atime = "off";
compression = "zstd";
dnodesize = "auto";
mountpoint = "none";
normalization = "formD";
xattr = "sa";
};
datasets = {
root = {
type = "zfs_fs";
options.mountpoint = "none";
};
"root/nixos" = {
type = "zfs_fs";
mountpoint = "/";
options = {
canmount = "noauto";
mountpoint = "legacy";
};
postCreateHook = "zfs snapshot rpool/root/nixos@blank";
};
home = {
type = "zfs_fs";
mountpoint = "/home";
options.mountpoint = "legacy";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
options.mountpoint = "legacy";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
options.mountpoint = "legacy";
};
var = {
type = "zfs_fs";
options.mountpoint = "none";
};
"var/log" = {
type = "zfs_fs";
mountpoint = "/var/log";
options.mountpoint = "legacy";
};
"var/lib" = {
type = "zfs_fs";
mountpoint = "/var/lib";
options.mountpoint = "legacy";
};
reserved = {
type = "zfs_volume";
size = "8G";
};
};
};
};
}