audio: move framenix to pipewire, keep thinknix at pulseaudio

This commit is contained in:
Trolli Schmittlauch 2024-05-21 22:40:26 +02:00
parent 5e7a41ab47
commit 716df0c611
5 changed files with 44 additions and 16 deletions

View file

@ -131,26 +131,11 @@ in
extraBackends = [ pkgs.hplip ]; extraBackends = [ pkgs.hplip ];
}; };
# Enable sound.
hardware.pulseaudio = {
enable = true;
# decouple pulseaudio application and sink volumes
daemon.config = {
flat-volumes = "no";
};
# C3D2 hq music
zeroconf.discovery.enable = true;
zeroconf.publish.enable = true;
};
# Bluetooth # Bluetooth
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
settings.General.Disable = "Headset"; # disable headset profile settings.General.Disable = "Headset"; # disable headset profile
}; };
hardware.pulseaudio = {
package = pkgs.pulseaudioFull;
};
# FIXME: at some point, hide GUI and sound (desktop vs. server) behind an option # FIXME: at some point, hide GUI and sound (desktop vs. server) behind an option
# Enable the X11 windowing system. # Enable the X11 windowing system.

26
common/pipewire.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
# rtkit is optional but recommended
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
};
environment.systemPackages = [ pkgs.easyeffects ];
# TODO: can be done in a simpler way in 24.05, see wiki.nixos.org
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
}

15
common/pulseaudio.nix Normal file
View file

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
# Enable sound.
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
# decouple pulseaudio application and sink volumes
daemon.config = {
flat-volumes = "no";
};
# C3D2 hq music
zeroconf.discovery.enable = true;
zeroconf.publish.enable = true;
};
}

View file

@ -11,6 +11,7 @@ in
{ {
imports = [ imports = [
../../common ../../common
../../common/pipewire.nix
./hardware-configuration.nix ./hardware-configuration.nix
./storage.nix ./storage.nix

View file

@ -7,6 +7,7 @@
{ {
imports = [ imports = [
../../common ../../common
../../common/pulseaudio.nix
./hardware-configuration.nix ./hardware-configuration.nix
./storage.nix ./storage.nix