mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 05:09:44 +01:00
30 lines
738 B
Nix
30 lines
738 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
{
|
||
|
services.mpd = {
|
||
|
enable = true;
|
||
|
musicDirectory = "/my/music/dir";
|
||
|
extraArgs = [ "--verbose" ];
|
||
|
network.startWhenNeeded = true;
|
||
|
};
|
||
|
|
||
|
home.stateVersion = "22.11";
|
||
|
|
||
|
test.stubs.mpd = { };
|
||
|
|
||
|
nmt.script = ''
|
||
|
serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/mpd.service)
|
||
|
assertFileContent "$serviceFile" ${./start-when-needed.service}
|
||
|
|
||
|
socketFile=home-files/.config/systemd/user/mpd.socket
|
||
|
assertFileContent "$socketFile" ${./start-when-needed.socket}
|
||
|
|
||
|
confFile=$(grep -o \
|
||
|
'/nix/store/.*-mpd.conf' \
|
||
|
$TESTED/home-files/.config/systemd/user/mpd.service)
|
||
|
assertFileContent "$confFile" ${./basic-configuration.conf}
|
||
|
'';
|
||
|
}
|