From eb439ea06fa96bc3b8ed935a45d7eddb06a570c2 Mon Sep 17 00:00:00 2001 From: Soispha Date: Tue, 27 Jun 2023 17:54:14 +0200 Subject: Fix(hm/conf/mpd): Remove hardcoded uid in host path --- home-manager/config/mpd/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'home-manager/config/mpd/default.nix') 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; -- cgit 1.4.1