This adds automatic detection and configuration for input peripherals: - bluetooth: Detects Bluetooth hardware and automatically enables - fingerprint: Detects USB fingerprint devices using libfprint device database Builds on PR #458177 (graphics). Part of incremental upstreaming from nixos-facter-modules.
14 lines
419 B
Nix
14 lines
419 B
Nix
{ lib, config, ... }:
|
|
{
|
|
options.hardware.facter.detected.bluetooth.enable =
|
|
lib.mkEnableOption "Enable the Facter bluetooth module"
|
|
// {
|
|
default = builtins.length (config.hardware.facter.report.hardware.bluetooth or [ ]) > 0;
|
|
defaultText = "hardware dependent";
|
|
};
|
|
|
|
config.hardware.bluetooth.enable = lib.mkIf config.hardware.facter.detected.bluetooth.enable (
|
|
lib.mkDefault true
|
|
);
|
|
}
|