From d055b309a6277343cb1033a11d7500f0a0f669fc Mon Sep 17 00:00:00 2001 From: Aerden <27950824+Aerden@users.noreply.github.com> Date: Thu, 22 Jan 2026 20:10:06 +0800 Subject: [PATCH] mpdscribble: fix journal file location It should be in the user's home directory instead of /var/lib --- modules/services/mpdscribble.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/services/mpdscribble.nix b/modules/services/mpdscribble.nix index 0ebc1386..847df6bb 100644 --- a/modules/services/mpdscribble.nix +++ b/modules/services/mpdscribble.nix @@ -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 = {