nix-config/modules/common/profiles/bluetooth/default.nix

19 lines
418 B
Nix

{ config, lib, _class, ... }:
let
cfg = config.my.profiles.bluetooth;
in
{
options.my.profiles.bluetooth = with lib; {
enable = mkEnableOption "bluetooth profile";
};
config = lib.mkIf cfg.enable (lib.mkMerge [
(lib.optionalAttrs (_class == "home") {
my.home.bluetooth.enable = true;
})
(lib.optionalAttrs (_class == "nixos") {
my.hardware.bluetooth.enable = true;
})
]);
}