diff --git a/modules/system/bluetooth.nix b/modules/system/bluetooth.nix index 8eecd22..b2b3d37 100644 --- a/modules/system/bluetooth.nix +++ b/modules/system/bluetooth.nix @@ -33,5 +33,19 @@ in # Add Bluetooth LE audio support environment.systemPackages = with pkgs; [ liblc3 ]; + + # FIXME: Create systemd service to manually start the adapter on boot. + # This is a workaround for hardware.bluetooth.powerOnBoot not working as expected. + systemd.services.startBluetooth = { + description = "Manually starts the Bluetooth service on boot"; + after = [ "bluetooth.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + type = "simple"; + ExecStart = "${pkgs.bluez}/bin/bluetoothctl -- power on"; + Restart = "always"; + RestartSec = "5s"; + }; + }; }; }