diff --git a/flake.nix b/flake.nix index e02c761..da68564 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ ./modules/kernel.nix ./modules/fcitx5.nix ./modules/programs.nix + ./modules/bluetooth.nix ]; }; diff --git a/modules/audio.nix b/modules/audio.nix index 1a43980..2d190c1 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -1,7 +1,9 @@ { lib, config, ... }: with lib; -let cfg = config.voidconf.audio; -in { +let + cfg = config.voidconf.audio; +in +{ options.voidconf.audio = { enable = mkEnableOption "Enable all the audio daemons"; }; diff --git a/modules/bluetooth.nix b/modules/bluetooth.nix new file mode 100644 index 0000000..22c4edc --- /dev/null +++ b/modules/bluetooth.nix @@ -0,0 +1,26 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; +let + cfg = config.voiconf.bluetooth; +in +{ + options.voidconf.bluetooth = { + enable = mkEnableOption "Enables bluetooth tools"; + }; + config = mkIf cfg.enable { + hardware.bleutooth = { + enable = true; + }; + services.blueman = { + enable = true; + }; + environment.systemPackages = with pkgs; [ + bluez + ]; + }; +}