Hello.
I’m very new to NixOS, but having fun so far!
I’ve recently stumbled in to a problem with mounting a SMB share.
fileSystems."/home/mariush/toybox/appdata" = {
device = "//10.10.10.205/appdata";
fsType = "cifs";
options = let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.dev ice-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/home/mariush/.dotfiles/smb-secrets"]; };
As far as I can understand that should be working, but when it tries to fetch the secrets it fails with this error.
Error: Failed to open unit file /nix/store/8qzwwybxba71hqxiigrdb8z2rrcad945-nixos-system-nixibox-25.11.20260211.6c5e707/etc/systemd/system/home-mariush-toybox-appdata.automount
Is it the fact the secrets file is stored in my main config folder? Should I reference it in some way in home manager?
Any help would be appreciated. Been tearing my hair out for a day now.