desktop: fixes and move from ALVR to WiVRn

This commit is contained in:
2024-10-20 01:59:18 -04:00
parent a194ea6eb9
commit 51a984f518
5 changed files with 72 additions and 31 deletions

42
etcnixos/flake.lock generated
View File

@@ -23,22 +23,6 @@
"type": "github"
}
},
"alvr": {
"locked": {
"lastModified": 1727023213,
"narHash": "sha256-KPghRPcTbqCMktw9ahrtiq7a/seajAyLkEI2GS1x+sg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7c2572e5cf4329ad9fa50d33015aa7be394b4026",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "pull/308097/head",
"repo": "nixpkgs",
"type": "github"
}
},
"chaotic": {
"inputs": {
"flake-schemas": "flake-schemas",
@@ -303,11 +287,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1729381852,
"narHash": "sha256-Tl9738VMXlVjv7EVq3znrsodyUy0w1ekD0wsouzDybg=",
"lastModified": 1729403505,
"narHash": "sha256-1ILT9fxCbNQuToPWBhxC3N+hblIWW3WlEHnwcdoCBHE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "75d8eea61e93c46fed1919f9ec798b7911378b22",
"rev": "88d3f02d308cb29a07942d24539f960721a20fe0",
"type": "github"
},
"original": {
@@ -363,11 +347,11 @@
"root": {
"inputs": {
"agenix": "agenix",
"alvr": "alvr",
"chaotic": "chaotic",
"lanzaboote": "lanzaboote",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"wivrn": "wivrn"
}
},
"rust-overlay": {
@@ -405,6 +389,22 @@
"repo": "default",
"type": "github"
}
},
"wivrn": {
"locked": {
"lastModified": 1729402130,
"narHash": "sha256-V9ZdbZ2iFVsN2AF/aJmSiRDp9rU5HYeQX+1NBYcKJzQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a2922fae7ea92ee5c3ddb5999ee1997c699d87f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "pull/349910/head",
"repo": "nixpkgs",
"type": "github"
}
}
},
"root": "root",

View File

@@ -12,7 +12,7 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
alvr.url = "github:NixOS/nixpkgs/pull/308097/head";
wivrn.url = "github:NixOS/nixpkgs/pull/349910/head";
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";

View File

@@ -38,7 +38,7 @@
"amdgpu.ppfeaturemask=0xFFF7FFFF"
];
initrd.availableKernelModules = [
kernelModules = [
# kernel module for case fan control
"nct6775"
];
@@ -53,7 +53,7 @@
services.displayManager.autoLogin = {
enable = true;
user = "yourusername";
user = "primary";
};
services.openssh = {
@@ -100,10 +100,29 @@
lact
];
programs.alvr = {
services.wivrn = {
enable = true;
package = inputs.alvr.legacyPackages.${pkgs.system}.alvr;
openFirewall = true;
package = inputs.wivrn.legacyPackages.${pkgs.system}.wivrn;
defaultRuntime = true;
autoStart = true;
config = {
enable = true;
json = {
scale = 1.0;
bitrate = 100000000;
encoders = [
{
encoder = "vaapi";
codec = "h265";
width = 1.0;
height = 1.0;
offset_x = 0.0;
offset_y = 0.0;
}
];
};
};
};
programs.steam = {
@@ -143,7 +162,6 @@
gpu_path = "/sys/devices/pci0000:00/0000:00:03.1/0000:09:00.0/0000:0a:00.0/0000:0b:00.0/${select_hwmon}";
mobo_path = "/sys/devices/platform/nct6775.656/${select_hwmon}";
fan_speed = "${mobo_path}/pwm4";
in
''
INTERVAL=10

View File

@@ -205,11 +205,11 @@
]
},
"locked": {
"lastModified": 1729304879,
"narHash": "sha256-H7KGGJUU9BcDNnfXiATBGgs6FJKWQdfftNJS+/v2aMU=",
"lastModified": 1729391507,
"narHash": "sha256-as0I9xieJUHf7kiK2a9znDsVZQTFWhM1pLivII43Gi0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b259ef799b5ac014604da71ecd92d4a52603ed2d",
"rev": "784981a9feeba406de38c1c9a3decf966d853cca",
"type": "github"
},
"original": {

View File

@@ -2,6 +2,7 @@
pkgs,
inputs,
lib,
config,
...
}:
{
@@ -25,4 +26,26 @@
obs-pipewire-audio-capture
];
};
# https://wiki.nixos.org/wiki/VR
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
{
"config" :
[
"${config.xdg.dataHome}/Steam/config"
],
"external_drivers" : null,
"jsonid" : "vrpathreg",
"log" :
[
"${config.xdg.dataHome}/Steam/logs"
],
"runtime" :
[
"${pkgs.opencomposite}/lib/opencomposite"
],
"version" : 1
}
'';
}