Files
nix/hosts/common/user/configs/console/bluetooth/default.nix
2024-07-16 17:46:58 +03:00

32 lines
593 B
Nix

{
username ? throw "username argument is required",
}:
{
config,
lib,
pkgs,
...
}:
{
home-manager.users.${username}.systemd.user.services.mpris-proxy = {
Unit = {
Description = "MPRIS proxy";
Requires = [ "sound.target" ];
After = [
"network.target"
"sound.target"
];
};
Service.ExecStart = lib.meta.getExe (
pkgs.writeShellApplication {
name = "init-mpris-proxy";
runtimeInputs = with pkgs; [ bluez ];
text = "exec mpris-proxy";
}
);
Install.WantedBy = [ "default.target" ];
};
}