{ 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; }; }