2022-12-04 13:45:43 +00:00
|
|
|
{
|
|
|
|
tree,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2022-01-29 18:06:26 +00:00
|
|
|
imports = with tree; [
|
|
|
|
profiles.connectivity.bluetooth
|
|
|
|
profiles.sound.pulseaudio.pulse-bluetooth
|
|
|
|
];
|
|
|
|
|
|
|
|
systemd = {
|
|
|
|
timers.bt-autoconnect = {
|
2022-12-04 13:45:43 +00:00
|
|
|
wantedBy = ["timers.target"];
|
|
|
|
partOf = ["bt-autoconnect.service"];
|
2022-01-29 18:06:26 +00:00
|
|
|
timerConfig.OnCalendar = "minutely";
|
|
|
|
};
|
|
|
|
services.bt-autoconnect = {
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
script = ''
|
|
|
|
${pkgs.bluez}/bin/bluetoothctl connect 3E:39:E7:B2:86:29 || true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.pulseaudio.extraConfig = ''
|
|
|
|
set-default-sink bluez_card.3E_39_E7_B2_86_29
|
|
|
|
'';
|
|
|
|
}
|