{ clan-core, config, lib, ... }: 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 = let disks = ["/dev/disk/by-id/usb-JMicron_Generic_DISK00_0123456789ABCDEF-0:0" "/dev/disk/by-id/usb-JMicron_Generic_DISK01_0123456789ABCDEF-0:1"]; mkDisk = name: device: { inherit device; # suffix is to prevent disk name collisions name = name + "-" + suffix; type = "disk"; content = { type = "gpt"; partitions = { "zfs" = { size = "100%"; content = { type = "zfs"; pool = "yottamaster"; }; }; }; }; }; kv = lib.imap0 (i: v: rec { name = "yottamaster" + builtins.toString i; value = mkDisk name v; }) disks; in builtins.listToAttrs kv; zpool = { yottamaster = { type = "zpool"; mode = "mirror"; # Workaround: cannot import 'zroot': I/O error in disko tests options.cachefile = "none"; rootFsOptions = { compression = "zstd"; "com.sun:auto-snapshot" = "false"; }; datasets = { music = { type = "zfs_fs"; mountpoint = "/music"; options."com.sun:auto-snapshot" = "true"; }; }; }; }; }; }