{ config, pkgs, lib, ... }: { test.services.syncthing = { enable = true; openDefaultPorts = true; declarative = { cert = toString ; key = toString ; overrideFolders = true; folders = { movies.path = "/media/movies"; music-library.path = "/media/music-library"; podcasts.path = "/media/podcasts"; series.path = "/media/series"; }; }; }; systemd.services."permown._media" = { bindsTo = [ "media.mount" ]; after = [ "media.mount" ]; }; system.permown."/media" = { owner = "syncthing"; group = "syncthing"; umask = "0007"; }; systemd.services."syncthing" = { bindsTo = [ "media.mount" ]; after = [ "media.mount" ]; }; users.groups."syncthing".members = [ "mpd" "syncthing" "kodi" "palo" ]; }