1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-14 21:11:08 +01:00
home-manager/tests/modules/services/playerctld/basic.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

29 lines
671 B
Nix

{ config, pkgs, ... }:
{
config = {
services.playerctld.enable = true;
services.playerctld.package = pkgs.writeScriptBin "playerctld" "" // {
outPath = "@playerctld@";
};
nmt.script = ''
serviceFile=home-files/.config/systemd/user/playerctld.service
assertFileExists "$serviceFile"
assertFileContent "$serviceFile" "${pkgs.writeText "playerctld-test" ''
[Install]
WantedBy=default.target
[Service]
BusName=org.mpris.MediaPlayer2.playerctld
ExecStart=@playerctld@/bin/playerctld
Type=dbus
[Unit]
Description=MPRIS media player daemon
''}"
'';
};
}