{ clan-core, config, ... }: let suffix = config.clan.core.vars.generators.disk-id.files.diskId.value; in { imports = [ clan-core.clanModules.disk-id ]; boot.loader.systemd-boot.enable = true; disko.devices = { disk = { "main" = { # suffix is to prevent disk name collisions name = "main-" + suffix; type = "disk"; # Set the following in flake.nix for each maschine: # device = ; content = { type = "gpt"; partitions = { "boot" = { size = "1M"; type = "EF02"; # for grub MBR priority = 1; }; "ESP" = { size = "512M"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = ["nofail"]; }; }; "zfs" = { size = "100%"; content = { type = "zfs"; pool = "zroot"; }; }; }; }; }; }; zpool = { zroot = { type = "zpool"; # Workaround: cannot import 'zroot': I/O error in disko tests options.cachefile = "none"; rootFsOptions = { compression = "zstd"; "com.sun:auto-snapshot" = "false"; }; mountpoint = "/"; postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank"; datasets = { nix = { type = "zfs_fs"; mountpoint = "/nix"; }; srv = { type = "zfs_fs"; mountpoint = "/srv"; options."com.sun:auto-snapshot" = "true"; }; home = { type = "zfs_fs"; mountpoint = "/home"; options."com.sun:auto-snapshot" = "true"; }; }; }; }; }; }