From e62b607ac9a136638d47eb5f56e73780ff92fdf3 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 12 Nov 2024 20:04:54 -0500 Subject: [PATCH] feat(bt): auto connect speaker on boot --- devices/homie/modules/music/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devices/homie/modules/music/default.nix b/devices/homie/modules/music/default.nix index 5db37ac2..258163cc 100644 --- a/devices/homie/modules/music/default.nix +++ b/devices/homie/modules/music/default.nix @@ -28,10 +28,19 @@ in { systemd.user.services = { pulseaudio.after = ["bluetooth.service"]; spotifyd.after = ["pulseaudio.service"]; + ueboom = { + after = ["spotifyd.service"]; + path = with pkgs; [bluez]; + script = '' + sleep 60 + exec bluetoothctl connect 88:C6:26:93:4B:77 + ''; + }; }; systemd.user.targets.default.wants = [ "pulseaudio.service" "spotifyd.service" + "ueboom.service" ]; # Allow pulseaudio to be managed by MPD