adjust audio setup

This commit is contained in:
Ingolf Wagner 2020-02-19 06:28:39 +08:00
parent 67618358e0
commit 4e1174d608
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
5 changed files with 31 additions and 24 deletions

View file

@ -55,15 +55,15 @@ in {
# add virtual midi module
# -----------------------
boot = {
# to route midi signals
# between bitwig and vcvrack
kernelModules = [ "snd_virmidi" ];
# index=-2 prevents from beeing recognised as the default
# audio device
# midi_devs limit the number of midi devices.
extraModprobeConfig = "options snd-virmidi index=-2 midi_devs=1";
};
#boot = {
# # to route midi signals
# # between bitwig and vcvrack
# kernelModules = [ "snd_virmidi" ];
# # index=-2 prevents from beeing recognised as the default
# # audio device
# # midi_devs limit the number of midi devices.
# extraModprobeConfig = "options snd-virmidi index=-2 midi_devs=1";
#};
# LADSPA
# ------
@ -88,12 +88,11 @@ in {
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
# all in audio group can do audio
systemWide = true;
package = pkgs.pulseaudioFull;
extraConfig = ''
# automatically switch to newly-connected devices
@ -112,8 +111,10 @@ in {
sinkDescription = "sink_properties=device.description=${
sinkName index
}-${queua.label}";
masterValue =
if (index == 0) then "" else "master=${sinkName (index - 1)}";
masterValue = if (index == 0) then
""
else
"sink_master=${sinkName (index - 1)}";
pluginValue = "plugin=${ladspaPath}/${queua.plugin}";
labelValue = "label=${queua.label}";
controlValue = "control=${
@ -133,15 +134,15 @@ in {
# ---------------
environment.systemPackages = with pkgs; [
jackScript
# Music making
jack2Full
alsaUtils
patchage
zynaddsubfx
# ------------
#jackScript
#jack2Full
#patchage
#zynaddsubfx
#qjackctl
# qjackctl
alsaUtils
# LADSPA
# ------

View file

@ -49,7 +49,7 @@
services.urxvtd.enable = true;
system.custom = { bluetooth.enable = true; };
system.custom = { bluetooth.enable = false; };
# temperature / power consumption
# https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html

View file

@ -28,6 +28,9 @@ let
nixStartCopyq = "${pkgs.copyq}/bin/copyq"
nixShowCopyq = "${pkgs.copyq}/bin/copyq show"
nixStartTerminal = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc"
nixAlsaRaiseVolume = "${pkgs.alsaUtils}/bin/amixer set Master 5%+"
nixAlsaLowerVolume = "${pkgs.alsaUtils}/bin/amixer set Master 5%-"
nixAlsaMute = "${pkgs.alsaUtils}/bin/amixer set Master toggle"
'';
in {

View file

@ -330,9 +330,9 @@ myAdditionaKeys
-- Volume Control
--
-- ------------------------------------------------------------
[ ("<XF86AudioRaiseVolume>", spawn "amixer set Master 5%+")
, ("<XF86AudioLowerVolume>", spawn "amixer set Master 5%-")
, ("<XF86AudioMute>", spawn "amixer set Master toggle")
[ ("<XF86AudioRaiseVolume>", spawn nixAlsaRaiseVolume)
, ("<XF86AudioLowerVolume>", spawn nixAlsaLowerVolume)
, ("<XF86AudioMute>", spawn nixAlsaMute)
] ++
-- ------------------------------------------------------------
--

View file

@ -14,3 +14,6 @@ nixStartAlbert = ""
nixStartCopyq = ""
nixShowCopyq = ""
nixStartTerminal = ""
nixAlsaRaiseVolume = ""
nixAlsaLowerVolume = ""
nixAlsaMute = ""