modularize bluetooth

This commit is contained in:
Fabian Montero 2024-12-02 21:19:22 -06:00
parent 8fed4a320d
commit b64c85e314
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
2 changed files with 30 additions and 0 deletions

29
sys/modules/bluetooth.nix Normal file
View file

@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.sys.bluetooth;
in {
options.local.sys.bluetooth = {
enable = mkEnableOption "bluetooth settings";
};
config = mkIf cfg.enable {
hardware = {
bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
};
services = {
blueman.enable = true;
};
};
}

View file

@ -12,5 +12,6 @@
./virtualisation.nix
./android.nix
./users.nix
./bluetooth.nix
];
}