Why would that try to dump a disk though and not simply error out? I’d consider that a bug.
nix has some ‘fun’ string interpolation magic for paths, which I was suspicious of but couldn’t spot where it would be coming in to play. Well done Sandro.
I don’t think this is due to string interpolation, because there was no string interpolation. What seems to be happening IMO is when you set boot.initrd.luks.devices.ssd = "/something/that/looks/like/a/path";
, the NixOS module system sees that path as a module, not a configuration definition, because the type of boot.initrd.luks.devices
is attrsOf (submodule ...)
. So it tries to read it as Nix.
I’m really glad someone noticed the problem because I was dumbfounded
yah … that sounds a lot like string interpolation, which is what I was looking for and not seeing. It turns out to not technically be because of the feature with that name, but actually something … nastier.
Not to derail this too much, but this thread is an excellent example of situations in which strict typing clearly helps even the most experienced developers.
Except Sandro, apparently
Thank you all again. Now NixOS is running fine, and I am discovering it.
I have lots of questions, but that’ll go in other discussion threads, and I’ll do some searches on my own first.