mirror of
https://github.com/nix-community/home-manager
synced 2024-12-21 10:33:25 +00:00
32 lines
705 B
Nix
32 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
|
||
|
''
|
||
|
}"
|
||
|
'';
|
||
|
};
|
||
|
}
|