Mount bitlocker volumes automatically

I think I need the to use automounting of fuse volumes for that. But mounting fuse volumes is not possible via hardware-configuration.nix. Neither are they detected by nixos-generate-config.
My /etc/fstab file is read-only and nixos won’t let me edit it. My last attempt was to install the package linux-util and try using /etc/fstab.d/, as that works in other distros, but it seems the files in there are just ignored by nixos.

In other words, I found no way to automount bitlocker volumes so far. I have to mount them by hand every time I reboot.

Gnome has an option where I click the bitlocker volume, it asks for the password and I set it to remember it, but it forgets it after every reboot.

That’s not true. You might need to add a package to system.fsPackages, but it works fine.

Ok, I’ll try that later.

cryptsetup can mount bitlocker partitions with the BITLK extension (which is always available). all you need to do is add a etc crypttab configuration to your system definition. you definitely want to keep the recovery key files out of the nix store, so you should just put them into some root-readable, world non readable location inside etc or something and refer to the key location in the crypttab definition. you don’t need fuse at all. then, also in your system definition, you mount the bitlk partitions in /dev/mapper (use their decrypted UUID or the devmapper name) via fileSystems.“whatever” as you would any other partition.

edit: tiny note, this would only work automatically via the crypttab if using systemd, since the functionality required is systemd-cryptsetup. but you are probably using systemd, if I had to guess. another note, you probably want to use the ntfs3 filesystem driver if you are on a recent kernel, that way you don’t need fuse for ntfs-3g fs driver either

(There is no way to use NixOS without systemd)