Parent mkDir permissions/ownership
I was having issues with home-manager interacting with sops-nix resulting from the defined parent mkDir behavior.
https://github.com/Mic92/sops-nix/blob/912f9ff41fd9353dec1f783170793699789fe9aa/pkgs/sops-install-secrets/main.go#L203
I was setting up storing my GitHub user credentials for gh by setting path to /home/<user>/.config/gh/hosts.yml, as well as setting up the config in home-manager which loads into /home/<user>/.config/gh/config.yml, but based on the systemd service load-order, sops-nix loads first and creates the parent directory with the permissions and ownership of its running process (i.e. root).
This might be fixable by having the parent directory/directories created with the permissions and/or ownership of their respective parents (recursively).
This one is tricky to solve. You could use systemd.tmpfile.rules to create the symlink to some other directory instead in the meantime.
Just ran into the same issue. Maybe adding an option specifying whether path parent directories should be created as root or as owner user would solve this.
I get one cannot generally assume the parent directories should be created as owner, but in my case (setting private ssh keys in the home directory) this is inevitable...