From 9177bf6c020843e55bcbc8223fb5683fdd036a92 Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 11 Apr 2024 11:13:35 +0530 Subject: [PATCH] add bluetooth option --- modules/nixos/bluetooth/default.nix | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/modules/nixos/bluetooth/default.nix b/modules/nixos/bluetooth/default.nix index db51d5d..7a1db9b 100644 --- a/modules/nixos/bluetooth/default.nix +++ b/modules/nixos/bluetooth/default.nix @@ -1,10 +1,19 @@ -_: { - hardware.bluetooth = { - enable = true; - settings = { - General = { - Experimental = "true"; - Enable = "Source,Sink,Media,Socket"; +{ + config, + lib, + ... +}: { + options = { + bluetooth.enable = lib.mkEnableOption "enable bluetooth"; + }; + config = lib.mkIf config.bluetooth.enable { + hardware.bluetooth = { + enable = true; + settings = { + General = { + Experimental = "true"; + Enable = "Source,Sink,Media,Socket"; + }; }; }; };