common: profiles: migrate bluetooth
This commit is contained in:
parent
2027bb327e
commit
034cd3ac55
19
modules/common/profiles/bluetooth/default.nix
Normal file
19
modules/common/profiles/bluetooth/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ 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;
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -2,6 +2,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
# FIXME: empty
|
||||
./bluetooth
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.bluetooth;
|
||||
in
|
||||
{
|
||||
options.my.profiles.bluetooth = with lib; {
|
||||
enable = mkEnableOption "bluetooth profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hardware.bluetooth.enable = true;
|
||||
|
||||
my.home.bluetooth.enable = true;
|
||||
};
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./devices
|
||||
./gtk
|
||||
./laptop
|
||||
|
|
Loading…
Reference in a new issue