46 lines
1.4 KiB
Nix
46 lines
1.4 KiB
Nix
#
|
|
# Looking glass for virtualization on machines that can do
|
|
# GPU passthrough.
|
|
#
|
|
# vim: et:ts=2:sw=2:
|
|
{
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
|
|
#
|
|
# Setup instructions.
|
|
#
|
|
|
|
# 1. Install looking glass in the guest VM.
|
|
# Be sure to get a matching version.
|
|
# 2. If using an NVIDIA GPU, hook the encoder using the following patches:
|
|
# https://github.com/keylase/nvidia-patch/tree/master/win
|
|
# -> DLLs are included in ../../looking-glass-contrib.
|
|
# -> Rename %WINDIR%\system32\NvFBC64.dll -> %WINDIR%\system32\NvFBC64_.dll
|
|
# -> Copy the `nvfbcwrp64.dll` to %WINDIR%\system32\NvFBC64.dll.
|
|
# -> Rename %WINDIR%\SysWOW64\NvFBC.dll -> %WINDIR%\SysWow64\NvFBC_.dll
|
|
# -> Copy the `nvfbcwrp32.dll` to %WINDIR%\SysWOW64\NvFBC.dll.
|
|
# 3. Install https://github.com/ge9/IddSampleDriver onto the machine.
|
|
# -> Be sure to install its root cert by running the included batch file.
|
|
# -> Preferably use the Device Manager or devcon to install this.
|
|
# -> A copy is included ../../looking-glass-contrib.
|
|
# 4. Disable the e.g. QXL video device in the VM.
|
|
# 5. Start the VM and the looking glass client.
|
|
|
|
#
|
|
# NixOS configuration.
|
|
#
|
|
|
|
# Create the SHM file we'll use for display.
|
|
systemd.tmpfiles.rules = [
|
|
"f /dev/shm/looking-glass 0660 deprekages kvm -"
|
|
];
|
|
|
|
# Provide the looking-glass client.
|
|
environment.systemPackages = [
|
|
pkgs.looking-glass-client
|
|
];
|
|
|
|
}
|