Did you compare the performance difference between using SMB vs NFS on your qnap? In my environment, with a Linux client, read performance is noticeably better over NFS.
A couple of comments:
`sudo` `mount` `-t cifs ` `//ipaddress/path/to/dir` `/path/to/local/dir` `-o user=` `"user"` `,password=` `"password"` `,uid=$(` `id` `-u),gid=$(` `id` `-g)`
I would recommend against passing your password in plain text via the command line. Instead, use a credentials file and lock down the permissions.
Using a script to mount the files before launching digikam seems like it is an over-complicated solution. Why not just mount it your fstab or using a systemd mount file? No only would it remove the complexity of having to modify anything that launches digikam and change it to use the script but it would eliminate the need for this:
user ALL = NOPASSWD: /usr/bin/mount