depot/third_party/home-manager/tests/modules/services/playerctld/basic.nix
Default email a0869759be Project import generated by Copybara.
GitOrigin-RevId: ac319fd3149b23a3ad8ee24cb2def6e67acf194c
2021-07-03 00:36:30 +02:00

31 lines
705 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
''
}"
'';
};
}