pipewire: Replace pulseaudio

Required to make sound work on cranberry.
This commit is contained in:
Geoffrey Frogeye 2024-06-24 03:51:43 +02:00
parent 91df3670f6
commit 498357fffc
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 18 additions and 9 deletions

View file

@ -7,7 +7,10 @@ in
config = lib.mkIf config.frogeye.desktop.xorg { config = lib.mkIf config.frogeye.desktop.xorg {
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
pavucontrol # Because can't use Win+F1X on Pinebook 🙃 pwvucontrol # Because can't use Win+F1X on Pinebook 🙃
pavucontrol # Just in case
helvum
qpwgraph
sox sox
]; ];
sessionVariables = { sessionVariables = {
@ -30,8 +33,7 @@ in
"XF86AudioLowerVolume" = "${pactl} set-sink-mute @DEFAULT_SINK@ false; ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioLowerVolume" = "${pactl} set-sink-mute @DEFAULT_SINK@ false; ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "${pactl} set-sink-mute @DEFAULT_SINK@ true"; "XF86AudioMute" = "${pactl} set-sink-mute @DEFAULT_SINK@ true";
"${mod}+F8" = "${pactl} suspend-sink @DEFAULT_SINK@ 1; ${pactl} suspend-sink @DEFAULT_SINK@ 0"; # Re-synchronize bluetooth headset "${mod}+F8" = "${pactl} suspend-sink @DEFAULT_SINK@ 1; ${pactl} suspend-sink @DEFAULT_SINK@ 0"; # Re-synchronize bluetooth headset
"${mod}+F11" = "exec ${pkgs.pavucontrol}/bin/pavucontrol"; "${mod}+F11" = "exec ${pkgs.pavucontrol}/bin/pwvucontrol";
"${mod}+F12" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
# TODO Find pacmixer? # TODO Find pacmixer?
}; };
}; };

View file

@ -2,10 +2,21 @@
{ {
config = lib.mkIf config.frogeye.desktop.xorg { config = lib.mkIf config.frogeye.desktop.xorg {
boot.kernelModules = [ "i2c-dev" ]; # Allows using ddcutil boot.kernelModules = [ "i2c-dev" ]; # Allows using ddcutil
security.rtkit.enable = true; # Recommended for pipewire
services = { services = {
blueman.enable = true; blueman.enable = true;
displayManager.defaultSession = "none+i3"; displayManager.defaultSession = "none+i3";
udev.packages = with pkgs; [ ddcutil ]; # TODO Doesn't seem to help udev.packages = with pkgs; [ ddcutil ]; # TODO Doesn't seem to help
# Audio
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true; # Required for a lot of apps, probably
};
# Video
xserver = { xserver = {
enable = true; enable = true;
windowManager.i3.enable = true; windowManager.i3.enable = true;
@ -34,15 +45,11 @@
layout = "qwerty-fr"; layout = "qwerty-fr";
}; };
}; };
# Disco
}; };
# Enable sound & bluetooth # Enable sound & bluetooth
sound.enable = true; hardware.bluetooth.enable = true;
hardware = {
bluetooth.enable = true;
pulseaudio.enable = true;
# TODO Try pipewire
};
# So we can use gnome3 pinentry flavour # So we can use gnome3 pinentry flavour
services.dbus.packages = [ pkgs.gcr ]; services.dbus.packages = [ pkgs.gcr ];