nix-configs/nixos-modules/hardware/bluetooth.nix
2022-03-01 23:53:11 +01:00

24 lines
672 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.ragon.hardware.bluetooth;
in
{
options.ragon.hardware.bluetooth.enable = lib.mkEnableOption "Enables bluetooth stuff (tlp,...)";
config = lib.mkIf cfg.enable {
hardware.bluetooth.enable = true;
services.blueman.enable = true;
hardware.pulseaudio = {
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
};
ragon.gui.autostart = [
[ "${pkgs.blueberry}/bin/blueberry-tray" ]
];
environment.systemPackages = (if config.ragon.gui.enable then [ pkgs.blueberry ] else [ ]);
ragon.persist.extraDirectories = [
"/var/lib/bluetooth"
];
};
}