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
23 lines
519 B
Nix
23 lines
519 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
services.mpd.enable = true;
|
|
xdg.userDirs.enable = true;
|
|
|
|
home.stateVersion = "22.11";
|
|
|
|
test.stubs.mpd = { };
|
|
|
|
nmt.script = ''
|
|
serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/mpd.service)
|
|
assertFileContent "$serviceFile" ${./basic-configuration.service}
|
|
|
|
confFile=$(grep -o \
|
|
'/nix/store/.*-mpd.conf' \
|
|
$TESTED/home-files/.config/systemd/user/mpd.service)
|
|
assertFileContent "$confFile" ${./xdg-music-dir.conf}
|
|
'';
|
|
}
|