mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
mopidy: Add mopidy-scan service for scanning local media
This commit is contained in:
parent
05a3b156f0
commit
66858833e3
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user