Skip to content

Instantly share code, notes, and snippets.

@oprypin
Last active January 15, 2016 14:56
Show Gist options
  • Save oprypin/3e20e83268395a1bce2f to your computer and use it in GitHub Desktop.
Save oprypin/3e20e83268395a1bce2f to your computer and use it in GitHub Desktop.
Choose an appropriate video driver for Arch Linux that can be booted directly or from a virtual machine
[Unit]
Description=Choose an appropriate driver
Before=display-manager.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'systemd-detect-virt && d=mesa || d=nvidia; d="$d-libgl lib32-$d-libgl"; pacman -Q $d || yes | pacman -S --needed $d'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment