maybe fix pipewire

This commit is contained in:
Ingolf Wagner 2023-05-29 20:27:56 +02:00
parent 120ad98534
commit b3863bfc22
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
4 changed files with 41 additions and 14 deletions

View file

@ -135,7 +135,7 @@ in
[
{ command = "${pkgs.albert}/bin/albert"; always = true; }
{ command = toString backgroundCommand; always = true; }
#{ command = "${pkgs.flameshot}/bin/flameshot"; always = true; }
{ command = "${pkgs.wireplumber}/bin/wireplumber"; always = true; }
# { command = "systemctl --user restart polybar"; always = true; notification = false; }
];
fonts = {

View file

@ -21,8 +21,12 @@
./borg.nix
./trilium.nix
# todo move to component
./pipewire.nix
];
users.users.mainUser.extraGroups = [ "pipewire" ];
components.gui.enable = true;
components.terminal.enable = true;

View file

@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
# TODO test `alsactl init` after suspend to reinit mic
{
security.rtkit.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
environment.systemPackages = with pkgs; [
alsa-utils
pulseaudio
ponymix
];
services.pipewire = {
enable = true;
systemWide = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
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 ]"
}
'';
};
}

View file

@ -87,21 +87,9 @@ in
# because of systemWide ensure main user is in audio group
system.custom.mainUser.extraGroups = [ "audio" "pipewire" ];
#services.pipewire = {
# enable = true;
# systemWide = true;
# media-session.enable = true;
# pulse.enable = true;
# jack.enable = true;
# alsa.enable = true;
#};
#hardware.pulseaudio.enable = false;
#security.rtkit.enable = true;
# todo use pipewire for this
hardware.pulseaudio = {
enable = true;
enable = false;
package = pkgs.pulseaudioFull;
# all in audio group can do audio
systemWide = false;