about summary refs log tree commit diff stats
path: root/home-manager/config/mpd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home-manager/config/mpd/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/home-manager/config/mpd/default.nix b/home-manager/config/mpd/default.nix
index 3c83a468..5d349fc0 100644
--- a/home-manager/config/mpd/default.nix
+++ b/home-manager/config/mpd/default.nix
@@ -2,16 +2,16 @@
   config,
   pkgs,
   lib,
-  nixosSystemConfig,
+  osConfig,
   ...
 }: let
   dataDir = "${config.xdg.dataHome}/mpd";
   playlistDirectory = "${dataDir}/playlists";
-  runtimeDir = "/run/user/1000/mpd"; # TODO don't hardcode uid
+  runtimeDir = "/run/user/${builtins.toString osConfig.users.users.soispha.uid}/mpd";
 in {
-  systemd.user.services.mpd.Service.ExecStartPre =
-    lib.mkForce ''
-      ${pkgs.coreutils}/bin/mkdir -p "${dataDir}" "${playlistDirectory}" "${runtimeDir}"'';
+  systemd.user.services.mpd.Service.ExecStartPre = lib.mkForce ''
+    ${pkgs.coreutils}/bin/mkdir -p "${dataDir}" "${playlistDirectory}" "${runtimeDir}"
+  '';
   services.mpd = {
     enable = true;
     inherit dataDir;