57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.desktop.pipewire;
|
|
in {
|
|
options.desktop.pipewire = {
|
|
enable = lib.mkEnableOption "enable pipewire for sound!";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
security.rtkit.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
qpwgraph # patching software
|
|
pavucontrol # volume mixer
|
|
pulsemixer
|
|
];
|
|
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa = {
|
|
enable = true;
|
|
support32Bit = true;
|
|
};
|
|
pulse.enable = true;
|
|
jack.enable = true;
|
|
|
|
wireplumber = {
|
|
enable = true;
|
|
extraConfig = {
|
|
"99-renames" = {
|
|
# Use quoted dotted-property names to match WirePlumber/PipeWire rules
|
|
"monitor.alsa.rules" = [
|
|
{
|
|
matches = [
|
|
{
|
|
"node.name" = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink";
|
|
}
|
|
];
|
|
actions = {
|
|
"update-props" = {
|
|
"node.description" = "Speakers / 3.5mm";
|
|
"node.nick" = "Speakers / 3.5mm";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|