Hi all,
I’ve just found out about the x-systemd.automount option in fstab from Samba - NixOS Wiki so i thought I’d give it a try also for a local HDD I have installed on my system.
But when I try to run nixos-rebuild switch I get the following error at the activation phase:
Error: Failed to open unit file /nix/store/h5qfbppr0s2yfdgxgr1fiswjcrx81hpf-nixos-system-computerone-24.11.20241014.a3c0b3b/etc/systemd/system/mnt-HDD.mount
Caused by:
No such file or directory (os error 2)
warning: error(s) occurred while switching to the new configuration
During the reboot I’ve read on the tty something on systemd automount for HDD being successful so when I dropped into the desktop I tried to ls /mnt/HDD which got mounted correctly on the fly.
My flake also now builds and activates with no issues, no changes made.
I’m glad that the problem is fixed but I’m very confused on what happened.
There seems to be the same issue every time I edit the x-systemd.* options for any entry in fstab and they magically go away on reboot.
If someone has an explanation please let me know, thank you
Sadly not, but it hasn’t given me any problems since.
If I recall correctly I rebooted rebuilt and rebooted again and somehow it worked, not sure why, not sure how.
It also seemed that I had to repeat the procedure every time I changed a mount option.
I’m sorry, I’m not able to help you any further than this