---
# yaml-language-server: $schema=https://schema.blue-build.org/module-list-v1.json
modules:
  - type: script
    env:
      PUBLIC_KEY_DER_PATH: /etc/pki/akmods/certs/akmods-wunker-bunker.der
    secrets:
      - type: file
        source: ./.secure_files/MOK.priv
        mount:
          type: file
          destination: /tmp/certs/private_key.priv
    scripts:
      - installnvidia.sh
      # - installnvidiakmod.sh
  # - type: script
  #   scripts:
  #     - installnvidiapackages.sh
  - type: files
    files:
      - source: nvidia
        destination: /
  - type: kargs
    kargs:
      - rd.driver.blacklist=nouveau
      - modprobe.blacklist=nouveau
      - nvidia-drm.modeset=1
      - nvidia-drm.fbdev=1
  - type: script
    snippets:
      - cp /usr/lib/modprobe.d/nvidia-modeset.conf /etc/modprobe.d/nvidia-modeset.conf
      - sed -i 's/omit_drivers/force_drivers/g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
      - sed -i 's/ nvidia / i915 amdgpu nvidia /g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
