mpdscribble: fix journal file location
It should be in the user's home directory instead of /var/lib
This commit is contained in:
parent
0b435f768e
commit
d055b309a6
1 changed files with 2 additions and 6 deletions
|
|
@ -5,7 +5,6 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.mpdscribble;
|
||||
mpdCfg = config.services.mpd;
|
||||
|
|
@ -22,7 +21,6 @@ in
|
|||
meta.maintainers = [ lib.hm.maintainers.msyds ];
|
||||
|
||||
options.services.mpdscribble = {
|
||||
|
||||
enable = lib.mkEnableOption ''
|
||||
mpdscribble, an MPD client which submits info about tracks being played to
|
||||
Last.fm (formerly AudioScrobbler)
|
||||
|
|
@ -125,7 +123,6 @@ in
|
|||
If the endpoint is one of "${lib.concatStringsSep ''", "'' (builtins.attrNames endpointUrls)}" the url is set automatically.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
@ -134,14 +131,14 @@ in
|
|||
];
|
||||
systemd.user.services.mpdscribble =
|
||||
let
|
||||
localMpd = (cfg.host == "localhost" || cfg.host == "127.0.0.1");
|
||||
localMpd = cfg.host == "localhost" || cfg.host == "127.0.0.1";
|
||||
|
||||
mkSection = secname: secCfg: ''
|
||||
[${secname}]
|
||||
url = ${secCfg.url}
|
||||
username = ${secCfg.username}
|
||||
password = {{${secname}_PASSWORD}}
|
||||
journal = /var/lib/mpdscribble/${secname}.journal
|
||||
journal = ${config.xdg.dataHome}/mpdscribble/${secname}.journal
|
||||
'';
|
||||
|
||||
endpoints = lib.concatStringsSep "\n" (lib.mapAttrsToList mkSection cfg.endpoints);
|
||||
|
|
@ -209,7 +206,6 @@ in
|
|||
configFile="${configFile}"
|
||||
exec "${lib.getExe cfg.package}" --no-daemon --conf "$configFile"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
Unit = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue