Refactor sound card config

This commit is contained in:
2023-12-10 19:45:31 +00:00
parent 8380969c95
commit 0d015ac418
3 changed files with 47 additions and 34 deletions

View File

@ -4,6 +4,7 @@ with lib.my;
{
imports = [
./hardware-configuration.nix
./audio.nix
../desktop.nix
];
@ -16,32 +17,8 @@ with lib.my;
networking.hostName = "odyssey";
networking.hostId = "c5e68d78";
networking.networkmanager.enable = true;
environment.etc."pipewire/pipewire.conf.d/surround.conf".text = ''
context.modules = [
{
name = libpipewire-module-loopback
args = {
node.description = "1824c Surround"
capture.props = {
node.name = "1824c_Speakers"
media.class = "Audio/Sink"
audio.position = [ FL FR SL SR LFE ]
}
playback.props = {
node.name = "playback.1824c_Speakers"
audio.position = [ AUX0 AUX1 AUX3 AUX4 AUX5 ]
target.object = "alsa_output.usb-PreSonus_Studio_1824c_SC4E21110775-00.multichannel-output"
stream.dont-remix = true
node.passive = true
}
}
}
]
'';
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes