I am experimenting with NixOS on my laptop: I am booting NixOS off an USB thumb drive, and I would like to mount my home directory from the nvme drive in my laptop. My configuration.nix has the following stanza:
And nixos-rebuild switch: fails with this kind of error: boot.initrd.luks.devices.stash.device not of type string got nul (I can get the exact error message if needed).
Me and @rrix are confused by the error, are we missing anything obvious?
I think this can be explained by boot.initrd.luks.devices. is expecting a string as a leaf attribute for the device name, but you gave it stash.device which is an attribute set resolved to null.
It was a good guess, but that does not seem to be the issue, I saved the error message this time:
building the system configuration...
error: A definition for option `boot.initrd.luks.devices.stash.device' is not of type `string'. Definition values:
- In `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/tasks/encrypted-devices.nix': null
(use '--show-trace' to show detailed location information)