mopidy: Add mopidy-scan service for scanning local media

This commit is contained in:
Rickard Nilsson 2014-08-12 01:40:44 +02:00
parent 05a3b156f0
commit 66858833e3

View File

@ -92,6 +92,17 @@ in {
};
};
systemd.services.mopidy-scan = {
description = "mopidy local files scanner";
preStart = "mkdir -p ${cfg.dataDir} && chown -R mopidy:mopidy ${cfg.dataDir}";
serviceConfig = {
ExecStart = "${mopidyLauncher}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)} local scan";
User = "mopidy";
PermissionsStartOnly = true;
Type = "oneshot";
};
};
users.extraUsers.mopidy = {
inherit uid;
group = "mopidy";