about summary refs log tree commit diff stats
path: root/home-manager/config
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home-manager/config/mpd/default.nix10
-rw-r--r--home-manager/config/zsh/default.nix3
2 files changed, 7 insertions, 6 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;
diff --git a/home-manager/config/zsh/default.nix b/home-manager/config/zsh/default.nix
index 54309cc8..c1c20899 100644
--- a/home-manager/config/zsh/default.nix
+++ b/home-manager/config/zsh/default.nix
@@ -4,6 +4,7 @@
   lib,
   shell_library,
   system,
+  osConfig,
   ...
 }: {
   # TODO ADD THIS ADDON
@@ -100,7 +101,7 @@
       BEMENU_BACKEND = "wayland";
       BEMENU_OPTS = "--fn 'Source Code Pro 10' -c -l 30 -B 1 -W 0.9 --hf #ffffff";
 
-      MPD_HOST = "/run/user/1000/mpd/socket";
+      MPD_HOST = "/run/user/${builtins.toString osConfig.users.users.soispha.uid}/mpd/socket";
 
       # Clean the home dir {{{
       CARGO_HOME = "${config.xdg.dataHome}/cargo";