mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
mpdscribble: fix journal file location
It should be in the user's home directory instead of /var/lib
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user