navidrome starts fine and i can access the webpage, but it’s not seeing my music dir. here are the logs:
Jun 10 12:38:55 nixos navidrome[4511]: time="2024-06-10T12:38:55-04:00" level=error msg="Error stating dir" error="stat music: no such file or >
Jun 10 12:38:55 nixos navidrome[4511]: time="2024-06-10T12:38:55-04:00" level=error msg="Error importing MediaFolder" error="stat music: no suc>
Jun 10 12:38:55 nixos navidrome[4511]: time="2024-06-10T12:38:55-04:00" level=error msg="Errors while scanning media. Please check the logs"
Jun 10 12:38:55 nixos navidrome[4511]: time="2024-06-10T12:38:55-04:00" level=error msg="Error executing initial scan" error="scan error"
Jun 10 12:39:53 nixos navidrome[4511]: time="2024-06-10T12:39:53-04:00" level=error msg="Error stating dir" error="stat music: no such file or >
if i just run navidrome --musicfolder "/dir/for/music" it sees it just fine. the music folder is a mounted external drive. but ive adjusted the permissions and it doesn’t see the music if i just have it in my regular music folder either. what gives?
Just want to point out that when services.navidrome.settings.MusicFolder is set, the NixOS module adds MusicFolder to BindReadOnlyPaths automatically. This doesn’t solve the issue in the original post though, since the navidrome module still has ProtectHome=true instead of ProtectHome=tmpfs.
Note that the destination directory must exist or systemd must be able to create it. Thus, it is not possible to use those options for mount points nested underneath paths specified in InaccessiblePaths=, or under /home/ and other protected directories if ProtectHome=yes is specified. TemporaryFileSystem= with “:ro” or ProtectHome=tmpfs should be used instead.