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 ];
};
# 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
hardware.bluetooth = {
enable = true;
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
# 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 = [
../../common
../../common/pipewire.nix
./hardware-configuration.nix
./storage.nix
@ -26,7 +27,7 @@ in
systemd.services.nix-daemon.environment.TMPDIR = "/var/tmp";
# try newer kernels
boot.kernelPackages = pkgs.linuxPackages_6_8; # FIXME: virtualbox not yet compatible with 6.9
boot.kernelPackages = pkgs.linuxPackages_6_8; # FIXME: virtualbox not yet compatible with 6.9
boot.kernelParams = [
# powersave

View file

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