From 95a4409494bb04e02c1a755219e85df490a45c25 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Fri, 22 May 2026 20:14:59 +0200 Subject: [PATCH] feat(bluetooth): add enable option --- modules/bluetooth/default.nix | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index b0f12a30..c4a5c595 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -1,14 +1,23 @@ +{ lib, config, ... }: + +let + cfg = config.bluetooth; +in { - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - settings = { - General = { - Experimental = true; - FastConnectable = true; - }; - Policy = { - AutoEnable = true; + options.bluetooth.enable = lib.mkEnableOption "bluetooth"; + + config = lib.mkIf cfg.enable { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + Experimental = true; + FastConnectable = true; + }; + Policy = { + AutoEnable = true; + }; }; }; };