| 15 Jun 2023 |
@uep:matrix.org | somewhere in here:
datasetToPool = x: elemAt (splitString "/" x) 0;
fsToPool = fs: datasetToPool fs.device;
zfsFilesystems = filter (x: x.fsType == "zfs") config.system.build.fileSystems;
allPools = unique ((map fsToPool zfsFilesystems) ++ cfgZfs.extraPools);
rootPools = unique (map fsToPool (filter fsNeededForBoot zfsFilesystems));
| 16:22:40 |
@uep:matrix.org | or, misplaced in the thing that creates the import service, I guess | 16:23:00 |
@uep:matrix.org | * or, misplaced in the thing that creates the import service, just below, I guess | 16:23:08 |
@elvishjerricco:matrix.org | I'd just add a NixOS style assertion like assertions = [{ assertion = !(elem "" allPools); message = "pls no"; }] | 16:24:53 |
@uep:matrix.org | well, that will fail but not helpfully? | 16:26:15 |
@elvishjerricco:matrix.org | I mean failure is the only useful outcome | 16:26:31 |
@uep:matrix.org | but yes, it does fit there | 16:26:33 |