Refactor Systems

This commit is contained in:
jopejoe1 2023-03-14 13:50:59 +01:00
parent 4d7de09ec4
commit 9c32ed314c
8 changed files with 101 additions and 70 deletions

View file

@ -0,0 +1,19 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.bluetooth;
in
{
options.custom.hardware.bluetooth = with types; {
enable = mkBoolOpt false "Whether or not to enable bluetooth";
};
config = mkIf cfg.enable {
hardware.bluetooth.enable = true;
hardware.bluetooth.hsphfpd.enable = !config.services.pipewire.wireplumber.enable;
hardware.bluetooth.powerOnBoot = true;
};
}