2021-08-21 15:47:17 +02:00
|
|
|
{ config, lib, modulesPath, pkgs, ... }:
|
2021-07-10 12:44:09 +02:00
|
|
|
let
|
|
|
|
bluetoothSupport = config.sbruder.full;
|
|
|
|
in
|
|
|
|
lib.mkIf config.sbruder.gui.enable {
|
|
|
|
sound.enable = true;
|
2021-11-21 13:11:52 +01:00
|
|
|
security.rtkit.enable = true;
|
2021-07-10 12:44:09 +02:00
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
pulse.enable = true;
|
|
|
|
alsa = {
|
|
|
|
enable = true;
|
|
|
|
support32Bit = true;
|
|
|
|
};
|
2021-11-08 18:04:14 +01:00
|
|
|
};
|
2021-08-21 15:47:17 +02:00
|
|
|
|
2021-07-10 12:44:09 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
2023-02-20 22:35:11 +01:00
|
|
|
unstable.helvum # patch panel
|
2021-07-10 12:44:09 +02:00
|
|
|
pavucontrol
|
|
|
|
pulseaudio # pacmd and pactl
|
|
|
|
];
|
|
|
|
|
|
|
|
hardware.bluetooth.enable = lib.mkDefault bluetoothSupport;
|
|
|
|
services.blueman.enable = lib.mkDefault bluetoothSupport;
|
2023-05-25 20:27:07 +02:00
|
|
|
|
|
|
|
environment.etc."pipewire/pipewire.conf.d/10-behringer-umc202hd.conf".text = ''
|
|
|
|
# This is heavily based on the example from the PipeWire wiki:
|
|
|
|
# https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Virtual-Devices#behringer-umc404hd-microphoneguitar-virtual-sources
|
|
|
|
# It has the problem that the virtual source persists,
|
|
|
|
# even when the physical source is disconnected.
|
|
|
|
context.modules = [
|
|
|
|
{ name = libpipewire-module-loopback
|
|
|
|
args = {
|
|
|
|
node.description = "UMC202HD Left"
|
|
|
|
capture.props = {
|
|
|
|
node.name = "capture.UMC202HD_Left"
|
|
|
|
audio.position = [ FL ]
|
|
|
|
stream.dont-remix = true
|
|
|
|
target.object = "alsa_input.usb-BEHRINGER_UMC202HD_192k_12345678-00.analog-stereo"
|
|
|
|
node.passive = true
|
|
|
|
}
|
|
|
|
playback.props = {
|
|
|
|
node.name = "UMC202HD_Left"
|
|
|
|
media.class = "Audio/Source"
|
|
|
|
audio.position = [ MONO ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{ name = libpipewire-module-loopback
|
|
|
|
args = {
|
|
|
|
node.description = "UMC202HD Right"
|
|
|
|
capture.props = {
|
|
|
|
node.name = "capture.UMC202HD_Right"
|
|
|
|
audio.position = [ FR ]
|
|
|
|
stream.dont-remix = true
|
|
|
|
target.object = "alsa_input.usb-BEHRINGER_UMC202HD_192k_12345678-00.analog-stereo"
|
|
|
|
node.passive = true
|
|
|
|
}
|
|
|
|
playback.props = {
|
|
|
|
node.name = "UMC202HD_Right"
|
|
|
|
media.class = "Audio/Source"
|
|
|
|
audio.position = [ MONO ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'';
|
2021-07-10 12:44:09 +02:00
|
|
|
}
|