Skip to content

Daaboulex/rocksmith-nix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

180 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rocksmith-nix

CI NixOS unstable License: GPL-3.0

Rocksmith 2014 packaged for NixOS — WineASIO, rs-autoconnect, RS_ASIO, and declarative Home Manager module.

Upstream

Project Original code (no upstream)
License N/A
Tracked N/A

What Is This?

A Nix flake that wires together every Linux component needed to play Rocksmith 2014 on NixOS:

  • Four packagespatch-rocksmith shell helper, wineasio-32 (32-bit Wine ASIO bridge), rs-autoconnect (JACK auto-connect shim), rs-asio (Rocksmith's ASIO wrapper DLL)
  • Home Manager module — generates RS_ASIO.ini + Rocksmith.ini declaratively, deploys DLLs into the Proton prefix on every launch, exports a rocksmith-launch Steam wrapper that does the dance automatically
  • Optional GoXLR Line-In routing — WirePlumber rules wiring guitar input through GoXLR Mini/Full
  • Eval + format CI — no upstream-tracking workflow (own code), weekly flake.lock maintenance only

Packages

Package Arch Description
patch-rocksmith x86_64 Shell script to register WineASIO in a Rocksmith Proton prefix
wineasio-32 i686 32-bit ASIO-to-JACK driver for Wine (bridges Wine ASIO → PipeWire JACK)
rs-autoconnect i686 librsshim.so — shim library that auto-connects Rocksmith's JACK ports to PipeWire
rs-asio x86_64 RS_ASIO v0.7.4 DLLs — ASIO driver wrapper that intercepts Rocksmith's audio calls

Home Manager Module

The repo exports homeManagerModules.default — a full HM module that provides:

  • rocksmith-launch wrapper script (set as Steam launch option)
  • RS_ASIO.dll + avrt.dll deployed from Nix store (no network at runtime)
  • RS_ASIO.ini generated declaratively (WineASIO driver config)
  • Rocksmith.ini generated declaratively (game audio settings)
  • WineASIO DLLs auto-installed into Proton prefix
  • WirePlumber rules for GoXLR Line In → WineASIO routing (optional)
  • Wine/PipeWire environment (WINEDLLOVERRIDES + 32/64-bit JACK library paths)

Options

myModules.home.rocksmith = {
  enable = true;                        # Enable Rocksmith configuration
  latencyBuffer = 2;                    # 1-4, lower = less latency (default: 2)
  pipewireLatency = "256/48000";        # quantum/rate (default: "256/48000")
  steamAppDir = "~/.steam/...";         # Auto-detected (default: standard Steam path)
  goxlr.lineInRouting = true;           # WirePlumber rules for GoXLR Line In
  goxlr.deviceName = "GoXLRMini";       # "GoXLRMini" or "GoXLR" (default: "GoXLRMini")
};

Audio Chain

Guitar → 3.5mm cable → Audio Interface Line In
  → PipeWire/ALSA capture → PipeWire JACK → WineASIO (32-bit)
  → RS_ASIO → Rocksmith 2014

On Windows, Rocksmith uses a native ASIO driver (e.g., GoXLR ASIO). On Linux, wineasio-32 bridges Wine's ASIO calls to PipeWire's JACK emulation, and rs-autoconnect (librsshim.so) handles automatic JACK port routing. RS_ASIO.dll intercepts Rocksmith's audio initialization and redirects it through WineASIO.

Installation

Add as a flake input:

{
  inputs.rocksmith = {
    url = "github:Daaboulex/rocksmith-nix";
    inputs.nixpkgs.follows = "nixpkgs";
  };
}

Then use the package:

{ pkgs, inputs, ... }:
{
  environment.systemPackages = [ inputs.rocksmith.packages.${pkgs.system}.default ];
}

Usage

1. Add flake input

# flake.nix
inputs.rocksmith-nix = {
  url = "github:Daaboulex/rocksmith-nix";
  inputs.nixpkgs.follows = "nixpkgs";
};

2. Wire into host config

# In host flake-module.nix

# Overlay (provides pkgs.rs-asio, pkgs.wineasio-32, etc.)
nixpkgs.overlays = [ inputs.rocksmith-nix.overlays.default ];

# HM module
home-manager.sharedModules = [ inputs.rocksmith-nix.homeManagerModules.default ];

3. Enable in host HM config

myModules.home.rocksmith.enable = true;
myModules.home.rocksmith.goxlr.lineInRouting = true;  # if using GoXLR

4. Set Steam launch option (one-time)

rocksmith-launch %command%

That's it. Everything else is automatic on every game launch.

Optional additions to the launch option:

  • gamemoderun rocksmith-launch %command% — enable gamemode (CPU governor + scheduling)
  • MANGOHUD=1 rocksmith-launch %command% — enable FPS overlay

What the launch wrapper does

On every game start, rocksmith-launch automatically:

  1. Copies RS_ASIO.dll + avrt.dll from the Nix store into the game directory
  2. Deploys generated RS_ASIO.ini and Rocksmith.ini
  3. Copies wineasio32.dll into the Proton prefix
  4. Sets environment variables:
Variable Value Purpose
WINEDLLOVERRIDES wineasio=n,b Use native WineASIO DLL
PIPEWIRE_LATENCY 256/48000 Match PipeWire quantum (configurable)
WINEASIO_NUMBER_INPUTS 2 Prevent enumeration crash with multi-device setups
WINEASIO_FIXED_BUFFERSIZE 1 Lock buffer to PipeWire quantum
WINEASIO_PREFERRED_BUFFERSIZE 256 Derived from pipewireLatency option

System Requirements

  • PipeWire with JACK enabled (services.pipewire.jack.enable = true)
  • Low-latency audio — 48kHz @ 256 quantum (5.3ms) recommended
  • PAM realtime limits for the @audio group (memlock unlimited, rtprio 99)
  • Steam with Proton

Development

nix develop      # Enter dev shell (installs git hooks, provides nil LSP)
nix fmt          # Format all Nix files (nixfmt-rfc-style)
nix build        # Build default package (patch-rocksmith)
nix flake check  # Run all checks (eval + format)

Build individual packages:

nix build .#patch-rocksmith
nix build .#wineasio-32
nix build .#rs-autoconnect
nix build .#rs-asio

CI/CD

Workflow Trigger Purpose
ci.yml Push/PR Eval check, format check, build, verify
maintenance.yml Weekly (Sunday 4 AM UTC) Update flake.lock, cleanup stale branches

All GitHub Actions are pinned to full commit SHAs for reproducibility.

Credits

License

GPL-3.0 (inherited from upstream)


Maintained as part of the Daaboulex NixOS ecosystem.

About

Rocksmith 2014 packaged for NixOS - WineASIO, rs-autoconnect, RS_ASIO, patch helper + Home Manager module

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 65.6%
  • Nix 34.4%