nixos/modules/bluetooth.nix
2025-03-22 21:56:34 +01:00

18 lines
467 B
Nix

{ config, lib, pkgs, ... }:
{
options.services.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth";
config = lib.mkIf config.services.bluetooth.enable {
# add compatibility layer
systemd.services.bluetooth.serviceConfig.ExecStart = lib.mkForce [
""
"${pkgs.bluez}/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf -C"
];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
};
}