mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 09:09:45 +01:00
5427f3d1f0
If the user has enabled the XDG user directories module then we can use the XDG music directory in the MPD module. Otherwise we'll leave the option undefined so that the user is forced to define the directory to use. This applies to state version 22.11 and above. Fixes #3225
21 lines
482 B
Nix
21 lines
482 B
Nix
{ ... }:
|
|
|
|
{
|
|
services.mpdris2 = {
|
|
enable = true;
|
|
notifications = true;
|
|
multimediaKeys = true;
|
|
};
|
|
|
|
services.mpd.musicDirectory = "/home/hm-user/music";
|
|
|
|
test.stubs.mpdris2 = { };
|
|
|
|
nmt.script = ''
|
|
serviceFile=home-files/.config/systemd/user/mpdris2.service
|
|
assertFileContent "$serviceFile" ${./basic-configuration.service}
|
|
|
|
configFile=home-files/.config/mpDris2/mpDris2.conf
|
|
assertFileContent "$configFile" ${./basic-configuration.config}
|
|
'';
|
|
}
|