Skip to content

Commit e48982b

Browse files
committed
feat(mpd): symlink, closes #77
1 parent f876540 commit e48982b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

home/programs/audio/mpd.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
{ pkgs, ... }:
1+
{
2+
config,
3+
pkgs,
4+
lib,
5+
...
6+
}:
27
{
38
services.mpd = {
49
enable = true;
5-
# NOTE: might need dyn path (`~/Music` or something similar and symlink
6-
# nas mounts to it)
7-
musicDirectory = "/run/mount/nas/Music";
10+
musicDirectory = "$HOME/Music";
811
extraConfig = ''
912
audio_output {
1013
type "pipewire"
@@ -26,4 +29,8 @@
2629
enable = true;
2730
mpd.host = "127.0.0.1";
2831
};
32+
33+
home.activation.nasMusicSymlink = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
34+
ln -sfn /run/mount/nas/music ${config.home.homeDirectory}/Music/nas
35+
'';
2936
}

0 commit comments

Comments
 (0)