Compare commits
2 Commits
cb4def1f42
...
f4e7dc9772
| Author | SHA1 | Date | |
|---|---|---|---|
| f4e7dc9772 | |||
| e39e3aff80 |
@ -244,10 +244,18 @@
|
|||||||
U_PACING_COMP_MIN_TIME_MS = "5";
|
U_PACING_COMP_MIN_TIME_MS = "5";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# bigscreen udev rule
|
# bigscreen udev rule
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0101", MODE="0666"
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0101", MODE="0666"
|
||||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0202", MODE="0666"
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0202", MODE="0666"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# For streaming
|
||||||
|
services.sunshine = {
|
||||||
|
enable = true;
|
||||||
|
autoStart = true;
|
||||||
|
capSysAdmin = true;
|
||||||
|
openFirewall = true;
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
6
home.nix
6
home.nix
@ -22,10 +22,14 @@
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
tmux
|
tmux
|
||||||
inputs.oscgoesbrrr.packages.${system}.default
|
inputs.oscgoesbrrr.packages.${system}.default
|
||||||
|
alcom
|
||||||
|
vesktop
|
||||||
|
moonlight-qt
|
||||||
# inputs.nixgl.nixGLIntel
|
# inputs.nixgl.nixGLIntel
|
||||||
# htop
|
# htop
|
||||||
#inputs.baballonia.${system}.default
|
#inputs.baballonia.${system}.default
|
||||||
];
|
] ++ lib.optionals (system == "x86-linux") (import ./unity_vrchat.nix {pkgs = pkgs; }).packages;
|
||||||
|
|
||||||
|
|
||||||
# Wayvr customization
|
# Wayvr customization
|
||||||
xdg.configFile."wlxoverlay/openxr_actions.json5" = {
|
xdg.configFile."wlxoverlay/openxr_actions.json5" = {
|
||||||
|
|||||||
64
unity_vrchat.nix
Normal file
64
unity_vrchat.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
# Define a unityhub that includes fonts.
|
||||||
|
unityhub = pkgs.unityhub.override { extraPkgs = pkgs: [pkgs.corefonts pkgs.ipafont]; };
|
||||||
|
|
||||||
|
in {
|
||||||
|
packages = [
|
||||||
|
unityhub
|
||||||
|
(pkgs.stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "unity";
|
||||||
|
version = "2022.3.22f1";
|
||||||
|
dontFixup = true;
|
||||||
|
|
||||||
|
unitySrc = pkgs.fetchurl {
|
||||||
|
url = "https://download.unity3d.com/download_unity/887be4894c44/LinuxEditorInstaller/Unity-2022.3.22f1.tar.xz";
|
||||||
|
hash = "sha256-eE//d2kFHA9p7bA52NCUMeeuQASmSh20QDcJ3biKpQY=";
|
||||||
|
};
|
||||||
|
androidSupportSrc = pkgs.fetchurl {
|
||||||
|
url = "https://download.unity3d.com/download_unity/887be4894c44/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2022.3.22f1.pkg";
|
||||||
|
hash = "sha256-Vqk8HgnFsUzjLvjIhIdJTLFHpyE6UDhwR7hN7/Jjpak=";
|
||||||
|
};
|
||||||
|
windowsSupportSrc = pkgs.fetchurl {
|
||||||
|
url = "https://download.unity3d.com/download_unity/887be4894c44/MacEditorTargetInstaller/UnitySetup-Windows-Mono-Support-for-Editor-2022.3.22f1.pkg";
|
||||||
|
hash = "sha256-iBGBpsg3IwooTqQSC/y14qq5QLuQEOvftQ07iGXCBZ0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgs.cpio pkgs.xarMinimal ];
|
||||||
|
buildInputs = [ unityhub.fhsEnv ];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
mkdir android
|
||||||
|
xar -C android -xf "${androidSupportSrc}"
|
||||||
|
mkdir windows
|
||||||
|
xar -C windows -xf "${windowsSupportSrc}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
# This Editor/version/Editor path helps Unity Hub recognize the version of the editor.
|
||||||
|
mkdir -p "$out/bin" "$out/Editor/${version}/Editor/Data/PlaybackEngines/AndroidPlayer" "$out/Editor/${version}/Editor/Data/PlaybackEngines/WindowsStandaloneSupport"
|
||||||
|
|
||||||
|
tar -C "$out/Editor/${version}" -xf "${unitySrc}"
|
||||||
|
gzip -d < android/TargetSupport.pkg.tmp/Payload | cpio -iD "$out/Editor/${version}/Editor/Data/PlaybackEngines/AndroidPlayer"
|
||||||
|
gzip -d < windows/TargetSupport.pkg.tmp/Payload | cpio -iD "$out/Editor/${version}/Editor/Data/PlaybackEngines/WindowsStandaloneSupport"
|
||||||
|
|
||||||
|
# Create unity wrapper script
|
||||||
|
cat > "$out/bin/unity" <<-EOF
|
||||||
|
#!/bin/sh
|
||||||
|
exec -a "$out/Editor/${version}/Editor/Unity" "${unityhub.fhsEnv}/bin/unityhub-fhs-env" "$out/Editor/${version}/Editor/Unity" "\$@"
|
||||||
|
EOF
|
||||||
|
chmod a+x "$out/bin/unity"
|
||||||
|
|
||||||
|
# Fix font fallback
|
||||||
|
cat > "$out/Editor/${version}/Editor/Data/Resources/fontsettings.txt" <<-EOF
|
||||||
|
English|default=Inter, IPAPGothic, Verdana, Tahoma
|
||||||
|
English|Inter-Regular=Inter, IPAPGothic, Verdana, Tahoma
|
||||||
|
English|Inter-SemiBold=Inter, IPAPGothic, Verdana, Tahoma
|
||||||
|
English|Inter-Small=Inter, IPAPGothic, Verdana, Tahoma
|
||||||
|
English|Inter-Italic=Inter, IPAPGothic, Verdana, Tahoma
|
||||||
|
English|Inter-SemiBoldItalic=Inter, IPAPGothic, Verdana, Tahoma
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user