feat(hardware): auto-detect audio, bluetooth, camera with declarative override
This commit is contained in:
@@ -206,23 +206,45 @@
|
||||
if (system_raw.features.peripherals.enabled | string | lower) == 'auto'
|
||||
else (system_raw.features.peripherals.enabled | bool)
|
||||
}}
|
||||
# fingerprint/webcam stay tri-state ('auto'|'true'|'false') because the
|
||||
# 'auto' branch is resolved at install time using detection results.
|
||||
# fingerprint/camera/audio/bluetooth stay tri-state ('auto'|'true'|'false')
|
||||
# because the 'auto' branch is resolved at install time using detection results.
|
||||
fingerprint: >-
|
||||
{{
|
||||
'auto'
|
||||
if (system_raw.features.peripherals.fingerprint | string | lower) == 'auto'
|
||||
else (system_raw.features.peripherals.fingerprint | bool | string | lower)
|
||||
}}
|
||||
webcam: >-
|
||||
camera: >-
|
||||
{{
|
||||
'auto'
|
||||
if (system_raw.features.peripherals.webcam | string | lower) == 'auto'
|
||||
else (system_raw.features.peripherals.webcam | bool | string | lower)
|
||||
if (system_raw.features.peripherals.camera | string | lower) == 'auto'
|
||||
else (system_raw.features.peripherals.camera | bool | string | lower)
|
||||
}}
|
||||
audio: >-
|
||||
{{
|
||||
'auto'
|
||||
if (system_raw.features.peripherals.audio | string | lower) == 'auto'
|
||||
else (system_raw.features.peripherals.audio | bool | string | lower)
|
||||
}}
|
||||
bluetooth: >-
|
||||
{{
|
||||
'auto'
|
||||
if (system_raw.features.peripherals.bluetooth | string | lower) == 'auto'
|
||||
else (system_raw.features.peripherals.bluetooth | bool | string | lower)
|
||||
}}
|
||||
displaylink: "{{ system_raw.features.peripherals.displaylink | bool }}"
|
||||
hardware:
|
||||
profile: "{{ system_raw.features.hardware.profile | default({}) }}"
|
||||
cpu: "{{ system_raw.features.hardware.cpu | default('') | string }}"
|
||||
gpus: "{{ system_raw.features.hardware.gpus | default([]) | list }}"
|
||||
wireless: "{{ system_raw.features.hardware.wireless | default([]) | list }}"
|
||||
audio: "{{ system_raw.features.hardware.audio | default([]) | list }}"
|
||||
camera: "{{ system_raw.features.hardware.camera | default({}) }}"
|
||||
fingerprint: "{{ system_raw.features.hardware.fingerprint | default(false) | bool }}"
|
||||
bluetooth: "{{ system_raw.features.hardware.bluetooth | default(false) | bool }}"
|
||||
packages: "{{ system_raw.features.hardware.packages | default({}) }}"
|
||||
disable: "{{ system_raw.features.hardware.disable | default([]) | list }}"
|
||||
kernel_params: "{{ system_raw.features.hardware.kernel_params | default([]) | list }}"
|
||||
hostname: "{{ system_name }}"
|
||||
os: "{{ system_os_input if system_os_input | length > 0 else (physical_default_os if system_type == 'physical' else '') }}"
|
||||
os_version: "{{ system_raw.version | default('') | string }}"
|
||||
|
||||
@@ -241,15 +241,21 @@
|
||||
- system_cfg.features.gpu.nvidia_driver in ["auto", "open", "proprietary", "nouveau"]
|
||||
- system_cfg.features.peripherals.enabled is defined
|
||||
- system_cfg.features.peripherals.fingerprint in ["auto", "true", "false"]
|
||||
- system_cfg.features.peripherals.webcam in ["auto", "true", "false"]
|
||||
- system_cfg.features.peripherals.camera in ["auto", "true", "false"]
|
||||
- system_cfg.features.peripherals.audio in ["auto", "true", "false"]
|
||||
- system_cfg.features.peripherals.bluetooth in ["auto", "true", "false"]
|
||||
- system_cfg.features.peripherals.displaylink is defined
|
||||
- system_cfg.features.hardware.profile is mapping
|
||||
- system_cfg.features.hardware.packages is mapping
|
||||
- system_cfg.features.hardware.camera is mapping
|
||||
- system_cfg.features.hardware.disable is sequence
|
||||
- system_cfg.features.hardware.kernel_params is sequence
|
||||
fail_msg: >-
|
||||
Invalid hardware feature flags. firmware.enabled/microcode,
|
||||
peripherals.enabled and peripherals.displaylink must be bool (or 'auto'
|
||||
sentinel for firmware); gpu.nvidia_driver in
|
||||
[auto|open|proprietary|nouveau]; peripherals.fingerprint and
|
||||
peripherals.webcam in [auto|true|false]; hardware.profile must be a dict.
|
||||
[auto|open|proprietary|nouveau]; peripherals.fingerprint/camera/audio/
|
||||
bluetooth in [auto|true|false]; hardware.profile must be a dict.
|
||||
quiet: true
|
||||
|
||||
- name: Validate desktop environment
|
||||
|
||||
Reference in New Issue
Block a user