diff --git a/modules/steamdeck/bluetooth.nix b/modules/steamdeck/bluetooth.nix new file mode 100644 index 00000000..b1c278f7 --- /dev/null +++ b/modules/steamdeck/bluetooth.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) + mkIf + mkMerge + mkOption + types + ; + cfg = config.jovian.devices.steamdeck; +in +{ + options = { + jovian.devices.steamdeck = { + enableBluetooth = mkOption { + type = types.bool; + default = cfg.enable; + defaultText = lib.literalExpression "config.jovian.devices.steamdeck.enable"; + description = '' + Whether to enable bluetooth. + ''; + }; + }; + }; + config = mkMerge [ + (mkIf (cfg.enableBluetooth) { + hardware.bluetooth.enable = true; + }) + ]; +} diff --git a/modules/steamdeck/default.nix b/modules/steamdeck/default.nix index 3396f363..5c50c9a9 100644 --- a/modules/steamdeck/default.nix +++ b/modules/steamdeck/default.nix @@ -12,6 +12,7 @@ let in { imports = [ + ./bluetooth.nix ./controller.nix ./fan-control.nix ./firmware.nix