15 Jun 2023 |
@elvishjerricco:matrix.org | Yea for sure | 16:13:37 |
@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 |
@elvishjerricco:matrix.org | So the message just needs to be helpful | 16:26:37 |
@elvishjerricco:matrix.org | I just didn't bother to write one because I'm on my phone :P | 16:26:50 |
@uep:matrix.org | yeah but it cant point to the dataset | 16:27:05 |
@elvishjerricco:matrix.org | Sure it can | 16:27:12 |
@elvishjerricco:matrix.org | Oh | 16:27:16 |
@elvishjerricco:matrix.org | Wait I see what you mean | 16:27:20 |
@elvishjerricco:matrix.org | It can name the mountpoint though | 16:27:28 |
@uep:matrix.org | yeah, all it can point to is the blank at that point | 16:27:32 |
@elvishjerricco:matrix.org | It's not uncommon to have more expensive, redundant computations in the message field, since it's lazily evaluated. Sometimes people throw in calculations that would error if the assertion isn't false | 16:28:23 |
@uep:matrix.org | fair | 16:28:55 |
@elvishjerricco:matrix.org | So the message can calculate which mountpoints are busted | 16:28:57 |
@uep:matrix.org | i'll look into this later, when it's not 02.30 | 16:29:33 |
@uep:matrix.org | it's probably enough to just have "must not start with /" in the message | 16:31:24 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org lol yea it'd probably be helpful for testing it https://gist.github.com/lilyinstarlight/0597b656045ed7042fd200d0f0e9879f | 16:58:59 |
K900 (deprecated) | Sadness | 17:18:35 |
K900 (deprecated) | I still can't get amdgpu to not modeset on my desktop | 17:18:45 |
K900 (deprecated) | It's triple monitors though | 17:18:49 |
K900 (deprecated) | I get it | 17:18:50 |
K900 (deprecated) | It's hard | 17:18:51 |
@elvishjerricco:matrix.org | I still have no idea what modesetting really means | 17:19:39 |
K900 (deprecated) | It just means switching the display mode | 17:20:04 |
K900 (deprecated) | Like, ideally you'd want to maintain the same display mode from power on to desktop, and have all the boot stages realize it was set correctly by firmware and not touch it after | 17:20:42 |