Add low-latency audio config to Lilim.

This commit is contained in:
Kevin Baensch 2023-01-29 14:43:52 +01:00
parent beccf32334
commit 054902353f
Signed by: derped
GPG key ID: C0F1D326C7626543

View file

@ -1,8 +1,46 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
services.cron.enable = false;
networking.dhcpcd.extraConfig = "noarp";
system.stateVersion = "19.09";
# low latency audio stuff
security.pam.loginLimits = [
{ domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; }
{ domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
{ domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; }
{ domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; }
];
environment = {
etc = {
"security/limits.d/91-nice.conf".text = ''
derped - nice -4
'';
};
variables = {
DSSI_PATH = "$HOME/.dssi:$HOME/.nix-profile/lib/dssi:/run/current-system/sw/lib/dssi";
LADSPA_PATH = "$HOME/.ladspa:$HOME/.nix-profile/lib/ladspa:/run/current-system/sw/lib/ladspa";
LV2_PATH = "$HOME/.lv2:$HOME/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2";
LXVST_PATH = "$HOME/.lxvst:$HOME/.nix-profile/lib/lxvst:/run/current-system/sw/lib/lxvst";
VST_PATH = "$HOME/.vst:$HOME/.nix-profile/lib/vst:/run/current-system/sw/lib/vst";
};
};
services = {
udev = {
packages = [];
extraRules = ''
KERNEL=="rtc0", GROUP="audio"
KERNEL=="hpet", GROUP="audio"
'';
};
};
boot = {
kernelModules = [ "snd-usb-audio" "snd-aloop" "snd-seq" "snd-rawmidi" ];
kernelParams = [ "threadirq" ];
extraModprobeConfig = ''
options snd-usb-audio nrpacks=1
'';
};
}