Skip to content

Commit

Permalink
pulseaudio/nixos: set it as default for openal/libao if enabled (#32078)
Browse files Browse the repository at this point in the history
- /var/run -> /run as the former is deprecated
- configure openal to use pulseaudio if pulseaudio is enabled
- configure libao to use pulseaudio if pulseaudio is enabled
  • Loading branch information
peterhoeg committed Nov 27, 2017
1 parent 6342886 commit 80c5cf8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/modules/config/pulseaudio.nix
Expand Up @@ -45,7 +45,7 @@ let
uid = ids.uids.pulseaudio;
gid = ids.gids.pulseaudio;

stateDir = "/var/run/pulse";
stateDir = "/run/pulse";

# Create pulse/client.conf even if PulseAudio is disabled so
# that we can disable the autospawn feature in programs that
Expand Down Expand Up @@ -219,6 +219,12 @@ in {

{ target = "pulse/daemon.conf";
source = writeText "daemon.conf" (lib.generators.toKeyValue {} cfg.daemon.config); }

{ target = "openal/alsoft.conf";
source = writeText "alsoft.conf" "drivers=pulse"; }

{ target = "libao.conf";
source = writeText "libao.conf" "default_driver=pulse"; }
];

# Allow PulseAudio to get realtime priority using rtkit.
Expand Down

0 comments on commit 80c5cf8

Please sign in to comment.