common: profiles: migrate bluetooth

This commit is contained in:
Bruno BELANYI 2024-01-03 16:51:34 +00:00
parent 033b0e8a57
commit e01c8330d6
4 changed files with 20 additions and 17 deletions

View file

@ -0,0 +1,19 @@
{ 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 == "homeManager") {
my.home.bluetooth.enable = true;
})
(lib.optionalAttrs (_class == "nixos") {
my.hardware.bluetooth.enable = true;
})
]);
}

View file

@ -2,6 +2,6 @@
{ ... }:
{
imports = [
# FIXME: empty
./bluetooth
];
}