diff --git a/machines/Lilim/configuration.nix b/machines/Lilim/configuration.nix index 8279fad..febd46e 100644 --- a/machines/Lilim/configuration.nix +++ b/machines/Lilim/configuration.nix @@ -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 + ''; + }; }