52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{ pkgs, inputs, ... }:
|
|
{
|
|
services.wivrn = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
|
|
# Use my fork for WiVRn 0.20
|
|
package = (
|
|
inputs.wivrn.legacyPackages.${pkgs.system}.wivrn.overrideAttrs (old: {
|
|
patches = [
|
|
(pkgs.fetchurl {
|
|
url = "https://github.com/WiVRn/WiVRn/commit/be95ec84b56794ca8d97bb8b21dec6443ba57bc4.diff";
|
|
sha256 = "1tNQ57XIki0bomNG5xg+/4YbgKanrM5LOQvvCmZQFhw=";
|
|
})
|
|
];
|
|
})
|
|
);
|
|
|
|
# Write information to /etc/xdg/openxr/1/active_runtime.json, VR applications
|
|
# will automatically read this and work with wivrn
|
|
defaultRuntime = true;
|
|
|
|
# Executing it through the systemd service executes WiVRn w/ CAP_SYS_NICE
|
|
# Resulting in no stutters!
|
|
autoStart = true;
|
|
|
|
# Config for WiVRn
|
|
config = {
|
|
enable = true;
|
|
json = {
|
|
# 1.0x display scaling
|
|
scale = 1.0;
|
|
# 100 Mb/s
|
|
bitrate = 100000000;
|
|
encoders = [
|
|
{
|
|
encoder = "vaapi";
|
|
codec = "h265";
|
|
# 1.0 x 1.0 scaling
|
|
width = 1.0;
|
|
height = 1.0;
|
|
offset_x = 0.0;
|
|
offset_y = 0.0;
|
|
}
|
|
];
|
|
|
|
application = [ pkgs.wlx-overlay-s ];
|
|
};
|
|
};
|
|
};
|
|
}
|