blob: 36197869957627a87e7dab7102766b2aca013ff4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{ ... }@moduleAttrs:
let
cfg = import ./config.nix moduleAttrs;
in
{
services.mpd = {
enable = true;
musicDirectory = cfg.mpd.musicDir;
playlistDirectory = cfg.mpd.playlistDir;
network = {
listenAddress = cfg.mpd.host;
port = cfg.mpd.port;
};
extraConfig = ''
user "imsohexy"
group "users"
restore_paused "yes"
metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update "yes"
auto_update_depth "5"
follow_outside_symlinks "yes"
follow_inside_symlinks "yes"
input {
plugin "curl"
}
audio_output {
type "pipewire"
name "My PipeWire Device"
}
audio_output {
type "fifo"
name "${cfg.mpd.visualizer_name}"
path "${cfg.mpd.visualizer_fifo}"
format "44100:16:2"
}
filesystem_charset "UTF-8"
'';
};
services.mpdris2 = {
# TODO: Hook to update dwmblock
enable = true;
notifications = false;
multimediaKeys = false;
mpd = {
host = cfg.mpd.host;
port = cfg.mpd.port;
musicDirectory = cfg.mpd.musicDir;
};
};
}
|