feat: added alvr fork

This commit is contained in:
uttarayan21
2025-05-25 22:56:24 +05:30
parent 85258d02a8
commit fbf6da2a81
9 changed files with 216 additions and 84 deletions

215
flake.lock generated
View File

@@ -80,13 +80,36 @@
"type": "github"
}
},
"alvr": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747930387,
"narHash": "sha256-3xot4vNRTHrYuE3ffbYwY3EozYeYkBgF2Gga19k1J/o=",
"ref": "nixos_debug",
"rev": "29eca663b644bcea6e7d8da0c91a32dda9fe79e9",
"revCount": 3211,
"submodules": true,
"type": "git",
"url": "https://github.com/uttarayan21/alvr.git"
},
"original": {
"ref": "nixos_debug",
"type": "git",
"url": "https://github.com/uttarayan21/alvr.git"
}
},
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1735828456,
@@ -106,7 +129,7 @@
"inputs": {
"advisory-db": "advisory-db",
"crane": "crane",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
@@ -292,7 +315,7 @@
"crane_5": {
"inputs": {
"flake-compat": "flake-compat_6",
"flake-utils": "flake-utils_6",
"flake-utils": "flake-utils_7",
"nixpkgs": [
"music-player",
"nixpkgs"
@@ -394,7 +417,7 @@
"inputs": {
"advisory-db": "advisory-db_2",
"crane": "crane_2",
"flake-utils": "flake-utils_3",
"flake-utils": "flake-utils_4",
"nix-github-actions": "nix-github-actions_2",
"nixpkgs": [
"nixpkgs"
@@ -752,7 +775,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
@@ -769,12 +792,15 @@
}
},
"flake-utils_10": {
"inputs": {
"systems": "systems_15"
},
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -799,8 +825,23 @@
}
},
"flake-utils_12": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_13": {
"inputs": {
"systems": "systems_15"
"systems": "systems_16"
},
"locked": {
"lastModified": 1710146030,
@@ -816,9 +857,9 @@
"type": "github"
}
},
"flake-utils_13": {
"flake-utils_14": {
"inputs": {
"systems": "systems_16"
"systems": "systems_17"
},
"locked": {
"lastModified": 1731533236,
@@ -834,9 +875,9 @@
"type": "github"
}
},
"flake-utils_14": {
"flake-utils_15": {
"inputs": {
"systems": "systems_17"
"systems": "systems_18"
},
"locked": {
"lastModified": 1726560853,
@@ -852,9 +893,9 @@
"type": "github"
}
},
"flake-utils_15": {
"flake-utils_16": {
"inputs": {
"systems": "systems_18"
"systems": "systems_19"
},
"locked": {
"lastModified": 1731533236,
@@ -874,24 +915,6 @@
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
@@ -906,9 +929,27 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1731533236,
@@ -944,14 +985,14 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_10"
"systems": "systems_8"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -983,11 +1024,11 @@
"systems": "systems_12"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
@@ -998,7 +1039,7 @@
},
"flake-utils_9": {
"inputs": {
"systems": "systems_14"
"systems": "systems_13"
},
"locked": {
"lastModified": 1731533236,
@@ -1017,7 +1058,7 @@
"ghostty": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_5",
"flake-utils": "flake-utils_6",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"zig": "zig",
@@ -1234,7 +1275,7 @@
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_8",
"systems": "systems_9",
"xdph": "xdph"
},
"locked": {
@@ -1411,7 +1452,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_9"
"systems": "systems_10"
},
"locked": {
"lastModified": 1746809694,
@@ -1610,7 +1651,7 @@
"advisory-db": "advisory-db_3",
"crane": "crane_5",
"fenix": "fenix",
"flake-utils": "flake-utils_7",
"flake-utils": "flake-utils_8",
"nixpkgs": [
"nixpkgs"
]
@@ -2070,7 +2111,7 @@
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_13"
"systems": "systems_14"
},
"locked": {
"lastModified": 1747449013,
@@ -2088,7 +2129,7 @@
},
"nno": {
"inputs": {
"flake-utils": "flake-utils_9",
"flake-utils": "flake-utils_10",
"neorg": "neorg",
"neorg-telescope": "neorg-telescope",
"nixpkgs": [
@@ -2114,7 +2155,7 @@
"norg": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_10",
"flake-utils": "flake-utils_11",
"nixpkgs": "nixpkgs_5"
},
"locked": {
@@ -2135,7 +2176,7 @@
"norg-meta": {
"inputs": {
"flake-compat": "flake-compat_8",
"flake-utils": "flake-utils_11",
"flake-utils": "flake-utils_12",
"nixpkgs": "nixpkgs_6"
},
"locked": {
@@ -2174,7 +2215,7 @@
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_8",
"flake-utils": "flake-utils_9",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
@@ -2197,7 +2238,7 @@
},
"onepassword-shell-plugins": {
"inputs": {
"flake-utils": "flake-utils_12",
"flake-utils": "flake-utils_13",
"nixpkgs": [
"nixpkgs"
]
@@ -2315,6 +2356,7 @@
},
"root": {
"inputs": {
"alvr": "alvr",
"anyrun": "anyrun",
"anyrun-hyprwin": "anyrun-hyprwin",
"anyrun-nixos-options": "anyrun-nixos-options",
@@ -2325,7 +2367,7 @@
"ddcbacklight": "ddcbacklight",
"deploy-rs": "deploy-rs",
"disko": "disko",
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_5",
"ghostty": "ghostty",
"guihua": "guihua",
"home-manager": "home-manager",
@@ -2406,7 +2448,7 @@
},
"rust-overlay_2": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs"
},
"locked": {
@@ -2596,21 +2638,6 @@
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_10": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -2625,6 +2652,21 @@
"type": "github"
}
},
"systems_10": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_11": {
"locked": {
"lastModified": 1681028828,
@@ -2745,7 +2787,7 @@
"type": "github"
}
},
"systems_2": {
"systems_19": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -2760,6 +2802,21 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
@@ -2837,16 +2894,16 @@
},
"systems_8": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"repo": "default",
"type": "github"
}
},
@@ -2869,7 +2926,7 @@
"inputs": {
"advisory-db": "advisory-db_4",
"crane": "crane_6",
"flake-utils": "flake-utils_13",
"flake-utils": "flake-utils_14",
"nix-github-actions": "nix-github-actions_3",
"nixpkgs": [
"nixpkgs"
@@ -2993,7 +3050,7 @@
},
"utils": {
"inputs": {
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1701680307,
@@ -3070,7 +3127,7 @@
"inputs": {
"advisory-db": "advisory-db_5",
"crane": "crane_7",
"flake-utils": "flake-utils_14",
"flake-utils": "flake-utils_15",
"nix-github-actions": "nix-github-actions_4",
"nixpkgs": [
"nixpkgs"
@@ -3122,7 +3179,7 @@
"zjstatus": {
"inputs": {
"crane": "crane_8",
"flake-utils": "flake-utils_15",
"flake-utils": "flake-utils_16",
"nixpkgs": [
"nixpkgs"
],

View File

@@ -163,6 +163,10 @@
url = "github:uttarayan21/zeronsd";
inputs.nixpkgs.follows = "nixpkgs";
};
alvr = {
url = "git+file:/home/servius/Projects/ALVR";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {

View File

@@ -19,14 +19,14 @@
./helix.nix
# ./ncmpcpp.nix
# ./neomutt.nix
# ./newsboat.nix
./newsboat.nix
./nix-index.nix
./nushell.nix
./sops.nix
./ssh.nix
./starship.nix
./tmux.nix
# ./tuifeed.nix
./tuifeed.nix
./yazi.nix
# ./zellij.nix
./zoxide.nix

30
nixos/ryu/apps/alvr.nix Normal file
View File

@@ -0,0 +1,30 @@
{
pkgs,
lib,
...
}: {
# package = pkgs.alvr.overrideAttrs (oldAttrs: {
# src = pkgs.fetchFromGitHub {
# owner = "alvr-org";
# repo = "ALVR-nightly";
# rev = "2fded66a929b6eaa7dd9c1cd986f67a6660c01bb";
# fetchSubmodules = true;
# hash = "sha256-x7RSTxHXwdjVVcbKkEA9tgER0gu8rjq0R62SAJWxoo0=";
# };
# });
programs.alvr = {
enable = true;
openFirewall = true;
package = pkgs.alvr-master;
# package = pkgs.alvr.overrideAttrs (oldAttrs: {
# nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [pkgs.cudatoolkit];
# buildInputs = oldAttrs.buildInputs ++ [pkgs.cudatoolkit];
# patches = [
# (pkgs.replaceVars ../../../patches/fix-finding-libs.patch {
# ffmpeg = lib.getDev pkgs.ffmpeg;
# x264 = lib.getDev pkgs.x264;
# })
# ];
# });
};
}

View File

@@ -0,0 +1,9 @@
{
pkgs,
lib,
...
}: {
imports = [
./alvr.nix
];
}

View File

@@ -8,6 +8,7 @@
./ryu.nix
./services
./programs
./apps
# ./vms
];
@@ -36,8 +37,6 @@
polkitPolicyOwners = ["servius"];
};
adb.enable = true;
alvr.enable = true;
alvr.openFirewall = true;
hyprland = {
enable = true;
# withUWSM = true;

View File

@@ -98,7 +98,7 @@
];
boot.kernelParams = [
"intel_iommu=on"
"vfio-pci.ids="
# "vfio-pci.ids="
];
boot.extraModulePackages = [];
# services.udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui pkgs.via];
@@ -158,4 +158,5 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.firmware = [pkgs.linux-firmware];
}

View File

@@ -152,6 +152,7 @@
cargoLock = {lockFile = "${src}/Cargo.lock";};
};
alvr-master = inputs.alvr.packages.${prev.system}.default;
};
anyrun-overlay = final: prev: {
anyrun =

View File

@@ -0,0 +1,31 @@
diff --git a/alvr/server_openvr/build.rs b/alvr/server_openvr/build.rs
index 2573d07e..130cfcce 100644
--- a/alvr/server_openvr/build.rs
+++ b/alvr/server_openvr/build.rs
@@ -1,24 +1,12 @@
use std::{env, path::PathBuf};
fn get_ffmpeg_path() -> PathBuf {
- let ffmpeg_path = alvr_filesystem::deps_dir()
- .join(if cfg!(target_os = "linux") {
- "linux"
- } else {
- "windows"
- })
- .join("ffmpeg");
-
- if cfg!(target_os = "linux") {
- ffmpeg_path.join("alvr_build")
- } else {
- ffmpeg_path
- }
+ PathBuf::from("@ffmpeg@")
}
#[cfg(all(target_os = "linux", feature = "gpl"))]
fn get_linux_x264_path() -> PathBuf {
- alvr_filesystem::deps_dir().join("linux/x264/alvr_build")
+ PathBuf::from("@x264@")
}
fn main() {