feat(hass): improve ueboom connection at boot
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
0a823fbb1a
commit
458dc14eef
1 changed files with 13 additions and 3 deletions
|
@ -27,13 +27,23 @@
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
pulseaudio.after = ["bluetooth.service"];
|
pulseaudio.after = ["bluetooth.service"];
|
||||||
spotifyd.after = ["pulseaudio.service"];
|
spotifyd.after = ["pulseaudio.service"];
|
||||||
|
|
||||||
ueboom = {
|
ueboom = {
|
||||||
after = ["spotifyd.service"];
|
after = ["spotifyd.service"];
|
||||||
path = with pkgs; [bluez];
|
path = builtins.attrValues {
|
||||||
|
inherit (pkgs) bluez;
|
||||||
|
inherit (config.hardware.pulseaudio) package;
|
||||||
|
};
|
||||||
script = ''
|
script = ''
|
||||||
sleep 60
|
if [[ "$(pactl get-default-sink)" == "auto_null" ]]; then
|
||||||
exec bluetoothctl connect 88:C6:26:93:4B:77
|
exec bluetoothctl connect 88:C6:26:93:4B:77
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 3;
|
||||||
|
RestartPreventExitStatus = 3;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.targets.default.wants = [
|
systemd.user.targets.default.wants = [
|
||||||
|
|
Loading…
Reference in a new issue