home-manager/tests/modules/services/mpd/basic-configuration.nix

20 lines
463 B
Nix
Raw Normal View History

2022-03-03 23:43:40 +00:00
{ config, lib, pkgs, ... }:
with lib;
{
services.mpd.enable = true;
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}
'';
}