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

20 lines
412 B
Nix
Raw Normal View History

2024-01-03 17:51:34 +01:00
{ config, lib, type, ... }:
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 (type == "home") {
my.home.bluetooth.enable = true;
})
(lib.optionalAttrs (type == "nixos") {
my.hardware.bluetooth.enable = true;
})
]);
}