1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00
home-manager/tests/modules/services/mpd/basic-configuration.nix

26 lines
579 B
Nix
Raw Normal View History

2022-03-04 00:43:40 +01:00
{ config, lib, pkgs, ... }:
with lib;
{
services.mpd = {
enable = true;
musicDirectory = "/my/music/dir";
extraArgs = [ "--verbose" ];
};
home.stateVersion = "22.11";
2022-03-04 00:43:40 +01:00
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" ${./basic-configuration.conf}
'';
}