rocksmith.nix (1444B)
1 { config, lib, pkgs, ... }: 2 { 3 services.pipewire = { 4 enable = true; 5 jack.enable = true; 6 }; 7 8 ### Audio Extra 9 security.rtkit.enable = true; # Enables rtkit (https://directory.fsf.org/wiki/RealtimeKit) 10 11 # domain = "@audio": This specifies that the limits apply to users in the @audio group. 12 # item = "memlock": Controls the amount of memory that can be locked into RAM. 13 # value (`unlimited`) allows members of the @audio group to lock as much memory as needed. This is crucial for audio processing to avoid swapping and ensure low latency. 14 # 15 # item = "rtprio": Controls the real-time priority that can be assigned to processes. 16 # value (`99`) is the highest real-time priority level. This setting allows audio applications to run with real-time scheduling, reducing latency and ensuring smoother performance. 17 # 18 security.pam.loginLimits = [ 19 { domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; } 20 { domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; } 21 ]; 22 23 # Add user to `audio` and `rtkit` groups. 24 users.users.jb55.extraGroups = [ "audio" "rtkit" ]; 25 26 environment.systemPackages = with pkgs; [ 27 qjackctl 28 rtaudio 29 ]; 30 31 ### Steam (https://nixos.wiki/wiki/Steam) 32 programs.steam.package = pkgs.steam.override { 33 extraLibraries = pkgs: [ pkgs.pkgsi686Linux.pipewire.jack ]; # Adds pipewire jack (32-bit) 34 }; 35 36 programs.steam.extraPackages = [ pkgs.wineasio ]; 37 }