From 953334c8417c364f8dbfbde92d60810ec23baa44 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 9 Jun 2024 16:34:39 +0200 Subject: [PATCH] Add bluetooth module --- system/shared/bluetooth.nix | 30 ++++++++++++++++++++++++++++++ system/shared/default.nix | 1 + 2 files changed, 31 insertions(+) create mode 100644 system/shared/bluetooth.nix diff --git a/system/shared/bluetooth.nix b/system/shared/bluetooth.nix new file mode 100644 index 0000000..f32fba8 --- /dev/null +++ b/system/shared/bluetooth.nix @@ -0,0 +1,30 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib) mkIf; + + sys = config.myOptions.system.bluetooth; +in { + config = mkIf sys.enable { + hardware.bluetooth = { + enable = true; + package = pkgs.bluez5-experimental; + #hsphfpd.enable = true; + powerOnBoot = true; + disabledPlugins = ["sap"]; + settings = { + General = { + JustWorksRepairing = "always"; + MultiProfile = "multiple"; + Experimental = true; + }; + }; + }; + + # https://nixos.wiki/wiki/Bluetooth + services.blueman.enable = true; + }; +} diff --git a/system/shared/default.nix b/system/shared/default.nix index 849efc8..37a7b12 100644 --- a/system/shared/default.nix +++ b/system/shared/default.nix @@ -11,6 +11,7 @@ _: { ./programs.nix ./system.nix ./network.nix + ./bluetooth.nix ./localisation.nix ]; }