[bluetooth] Add bluetooth role

This commit is contained in:
2024-09-19 20:26:10 -07:00
parent 736194b8b4
commit 4d39f8a635
3 changed files with 34 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
];
roles = {
bluetooth.enable = true;
desktop.enable = true;
nfs-mounts.enable = true;
printing.enable = true;

View File

@@ -0,0 +1,32 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.roles.bluetooth;
in
{
options.roles.bluetooth = {
enable = mkEnableOption "Enable the bluetooth role";
};
config =
{
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
hardware.bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
services.blueman.enable = true;
hardware.pulseaudio.package = pkgs.pulseaudioFull;
hardware.pulseaudio.extraConfig = "
load-module module-combine-sink
load-module module-switch-on-connect
";
};
}

View File

@@ -7,6 +7,7 @@ let
in
{
imports = [
./bluetooth
./desktop
./kodi
./nfs-mounts