Skip to content

Instantly share code, notes, and snippets.

View cidkidnix's full-sized avatar

Dylan Green cidkidnix

View GitHub Profile
@cidkidnix
cidkidnix / box64.nix
Last active February 23, 2024 19:21
self: super: super.lib.optionalAttrs (super.stdenv.targetPlatform.isAarch64) rec {
#-------#
# Box64 #
#-------#
mapNamesToPackage = {
"libX11" = super.xorg.libX11;
"libXcursor" = super.xorg.libXcursor;
"libXi" = super.xorg.libXi;
"libXrandr" = super.xorg.libXrandr;
@cidkidnix
cidkidnix / Cargo.lock
Created March 11, 2022 00:16
ALVR nixos package
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "ab_glyph"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d54a65e0d4f66f8536c98cb3ca81ca33b7e2ca43442465507a3a62291ec0d9e4"
dependencies = [
@cidkidnix
cidkidnix / alvr.nix
Created December 24, 2021 04:30
ALVR package nixos
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, alsaLib, openssl, glib, ffmpeg-full
, cairo, pango, atk, gdk-pixbuf, gtk3, vulkan-headers-update, vulkan-loader
, clangStdenv, llvmPackages, clang, clang-tools, libunwind, clang_12, makeWrapper, chromium, vulkan-validation-layers,
xorg, libxkbcommon, python3Full }:
with rustPlatform;
buildRustPackage rec {
pname = "alvr";
version = "16.0.0";
@cidkidnix
cidkidnix / polymc.nix
Created December 22, 2021 06:56
polymc nixos package
{ lib, mkDerivation, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL, msaClientID ? "" }:
let
libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ];
in
mkDerivation rec {
pname = "polymc";
version = "unstable-2021-09-08";
src = fetchFromGitHub {
owner = "PolyMC";
sed -i "s|rpool=.*|rpool=\`zdb -l \${GRUB_DEVICE} \| grep -E '[[:blank:]]name' \| cut -d\\\' -f 2\`|" /etc/grub.d/10_linux
@cidkidnix
cidkidnix / plasma5.patch
Last active November 30, 2021 07:23
I hate plasma5 nix scope
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix 2021-11-30 01:07:18.970026114 -0600
+++ a/nixos/modules/services/x11/desktop-managers/plasma5.nix 2021-11-30 01:09:06.331846165 -0600
@@ -138,6 +138,11 @@
description = "Enable the Plasma 5 (KDE 5) desktop environment.";
};
+ kwinPackage = mkOption {
+ type = types.package;
+ default = pkgs.kwin;
+ };
ffmpeg-alvr = super.ffmpeg-full.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [
"--enable-vulkan"
];
buildInputs = old.buildInputs ++ [
super.vulkan-headers
super.vulkan-loader
];
});
ffmpeg-alvr = super.ffmpeg-full.overrideAttrs (old: {
configureFlags = old.configureFlags ++ [
"--enable-vulkan"
];
buildInputs = old.buildInputs ++ [
super.vulkan-headers
super.vulkan-loader
];
});
services.pipewire = {
enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
jack.enable = true;
config.pipewire = {
"context.properties" = {
"link.max-buffers" = 16;
"log.level" = 2;
Pipewire is the replacement for JACK and PulseAudio, Pipewire allows low latency compared to any pulseaudio tweaks
Here is a short list of what you should do to get the lowest latency in Osu!
Higher audio rate equals less latency always, unless you increase your quantum
to calculate node latency for your audio device take the quantum size divided by your audio rate
so 64/96000 = 0.00066666666 * 1000 = 0.6ms this is 0.6ms node latency
To check client latency use pw-top, take the quantum size and the audio rate of the client then use quantum / audio rate * 1000
to get overall latency for the client