diff options
author | Soispha <soispha@vhack.eu> | 2023-06-27 17:54:14 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-06-27 17:54:14 +0200 |
commit | eb439ea06fa96bc3b8ed935a45d7eddb06a570c2 (patch) | |
tree | 2b23e5c351db7048731264c081e3f8aa13a834ed /home-manager/config/mpd | |
parent | Fix(hm/conf/mpd): Set MPD_HOST variable for mpd clients (diff) | |
download | nixos-config-eb439ea06fa96bc3b8ed935a45d7eddb06a570c2.tar.gz nixos-config-eb439ea06fa96bc3b8ed935a45d7eddb06a570c2.zip |
Fix(hm/conf/mpd): Remove hardcoded uid in host path
Diffstat (limited to 'home-manager/config/mpd')
-rw-r--r-- | home-manager/config/mpd/default.nix | 10 |
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; |