nixos-configuration/modules/bluetooth.nix
2025-04-16 22:54:28 +02:00

20 lines
456 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.jalr;
in
{
options.jalr = {
bluetooth.enable = pkgs.lib.mkEnableOption "Enable bluetooth" // { default = false; };
};
config = lib.mkIf cfg.bluetooth.enable {
hardware.bluetooth.enable = true;
services = {
blueman.enable = true;
ofono.enable = true;
upower.enable = true;
};
hardware.bluetooth.settings.General.Experimental = true; # to show battery state
};
}