I managed to set up the Library to point to my library, it is a largish library with about 20,000 tracks all Apple Lossles. I believe it managed to find all my music. Although I cannot really tell since I do not now how to display how many tracks I have.
If by "NAS" you mean "External harddrive with Ethernet port" you're likely screwed. What you'll need to do is update the version of samba that your tiny little Linux machine runs to a version of samba the inotify notifications that foobar2000 uses. Depending on your device this could either be boarderline impossible or a huge hassle. Especially if you've never used linux before.