PulseAudio: Difference between revisions

reflecting PipeWire as the new default
Pbek (talk | contribs)
Remove obsolete config example
 
(4 intermediate revisions by 4 users not shown)
Line 6: Line 6:
Add to your configuration:
Add to your configuration:


<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
hardware.pulseaudio.enable = true;
services.pipewire.enable = false;
hardware.pulseaudio.support32Bit = true;    ## If compatibility with 32-bit applications is desired.
services.pulseaudio.enable = true;
</syntaxHighlight>
services.pulseaudio.support32Bit = true;    # If compatibility with 32-bit applications is desired.
 
</syntaxhighlight>


You may need to add users to the <tt>audio</tt> group for them to be able to use audio devices:
You may need to add users to the <tt>audio</tt> group for them to be able to use audio devices:
Line 32: Line 34:
Or automatically:
Or automatically:
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
hardware.pulseaudio.extraConfig = "load-module module-combine-sink";
services.pulseaudio.extraConfig = "load-module module-combine-sink";
</syntaxHighlight>
</syntaxHighlight>


Line 38: Line 40:


<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
hardware.pulseaudio.extraConfig = "unload-module module-suspend-on-idle";
services.pulseaudio.extraConfig = "unload-module module-suspend-on-idle";
</syntaxHighlight>
</syntaxHighlight>


Line 85: Line 87:


<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
hardware.pulseaudio.package = pkgs.pulseaudioFull;
services.pulseaudio.package = pkgs.pulseaudioFull;
</syntaxHighlight>
</syntaxHighlight>


Line 103: Line 105:
To turn timer-based scheduling off add this to your configuration:
To turn timer-based scheduling off add this to your configuration:
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
hardware.pulseaudio.configFile = pkgs.runCommand "default.pa" {} ''
services.pulseaudio.configFile = pkgs.runCommand "default.pa" {} ''
   sed 's/module-udev-detect$/module-udev-detect tsched=0/' \
   sed 's/module-udev-detect$/module-udev-detect tsched=0/' \
     ${pkgs.pulseaudio}/etc/pulse/default.pa > $out
     ${pkgs.pulseaudio}/etc/pulse/default.pa > $out