{ config, lib, ... }: with lib; let cfg = config.local.hardware.bluetooth; in { options.local.hardware.bluetooth = { enable = mkEnableOption "bluetooth services"; }; config = mkIf cfg.enable { hardware.bluetooth = { enable = true; powerOnBoot = mkDefault false; }; local.boot.impermanence.directories = [ { directory = "/var/lib/bluetooth"; user = "root"; group = "root"; mode = "u=rwx,g=,o="; } ]; }; }