From f9a6bccf424bcf71d99bca3d505cfca168d64d11 Mon Sep 17 00:00:00 2001 From: osbm Date: Thu, 23 Oct 2025 21:30:19 +0300 Subject: [PATCH] add bluetooth option --- modules/nixos/hardware/bluetooth.nix | 7 +++++++ modules/nixos/hardware/default.nix | 1 + modules/nixos/options.nix | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100644 modules/nixos/hardware/bluetooth.nix diff --git a/modules/nixos/hardware/bluetooth.nix b/modules/nixos/hardware/bluetooth.nix new file mode 100644 index 0000000..d307d1d --- /dev/null +++ b/modules/nixos/hardware/bluetooth.nix @@ -0,0 +1,7 @@ +{ config, lib, ... }: +{ + config = lib.mkIf config.hardware.bluetooth.enable { + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/default.nix b/modules/nixos/hardware/default.nix index c803909..f916a3e 100644 --- a/modules/nixos/hardware/default.nix +++ b/modules/nixos/hardware/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./bluetooth.nix ./boot.nix ./sound.nix ./nvidia.nix diff --git a/modules/nixos/options.nix b/modules/nixos/options.nix index 17dfce3..4e0c973 100644 --- a/modules/nixos/options.nix +++ b/modules/nixos/options.nix @@ -158,6 +158,14 @@ # Hardware hardware = { + bluetooth = { + enable = lib.mkOption { + type = lib.types.bool; + default = config.osbmModules.desktopEnvironment != "none"; + description = "Enable Bluetooth support"; + }; + }; + sound = { enable = lib.mkOption { type = lib.types.bool;