Switch to pipewire

This commit is contained in:
Fabian Hauser 2022-01-03 11:38:01 +01:00
parent bb884338b4
commit 3fb217a613
2 changed files with 37 additions and 8 deletions

View file

@ -8,15 +8,42 @@
sound.enable = true; sound.enable = true;
nixpkgs.config.pulseaudio = true; nixpkgs.config.pulseaudio = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
media-session.enable = true;
media-session.config.bluez-monitor.rules = [
{
# Matches all cards
matches = [{ "device.name" = "~bluez_card.*"; }];
actions = {
"update-props" = {
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
# mSBC is not expected to work on all headset + adapter combinations.
"bluez5.msbc-support" = true;
# SBC-XQ is not expected to work on all headset + adapter combinations.
"bluez5.sbc-xq-support" = true;
};
};
}
{
matches = [
# Matches all sources
{
"node.name" = "~bluez_input.*";
}
# Matches all outputs
{ "node.name" = "~bluez_output.*"; }
];
actions = { "node.pause-on-idle" = false; };
}
];
};
security.rtkit.enable = true;
hardware = { hardware = {
pulseaudio = { pulseaudio.enable = lib.mkForce false;
enable = true;
extraModules = with pkgs; [ pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
extraConfig = ''
load-module module-switch-on-connect
'';
};
opengl.enable = true; opengl.enable = true;
acpilight.enable = true; acpilight.enable = true;
bluetooth = { bluetooth = {

View file

@ -2,6 +2,8 @@
# environment.systemPackages = with pkgs; [ polkit_gnome ]; #TODO: Needed? # environment.systemPackages = with pkgs; [ polkit_gnome ]; #TODO: Needed?
programs.sway.enable = true; programs.sway.enable = true;
xdg.portal.wlr.enable = true;
services.gnome.gnome-remote-desktop.enable = true; services.gnome.gnome-remote-desktop.enable = true;
#environment.systemPackages = with pkgs; [ pipewire ]; #environment.systemPackages = with pkgs; [ pipewire ];
#systemd.user.services.pipewire.environment.XDG_CURRENT_DESKTOP = "sway"; #systemd.user.services.pipewire.environment.XDG_CURRENT_DESKTOP = "sway";