pulseaudio/nixos: set it as default for openal/libao if enabled (#32078)

- /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

authored by Peter Hoeg and committed by GitHub 80c5cf80 63428868

+7 -1
+7 -1
nixos/modules/config/pulseaudio.nix
··· 45 uid = ids.uids.pulseaudio; 46 gid = ids.gids.pulseaudio; 47 48 - stateDir = "/var/run/pulse"; 49 50 # Create pulse/client.conf even if PulseAudio is disabled so 51 # that we can disable the autospawn feature in programs that ··· 219 220 { target = "pulse/daemon.conf"; 221 source = writeText "daemon.conf" (lib.generators.toKeyValue {} cfg.daemon.config); } 222 ]; 223 224 # Allow PulseAudio to get realtime priority using rtkit.
··· 45 uid = ids.uids.pulseaudio; 46 gid = ids.gids.pulseaudio; 47 48 + stateDir = "/run/pulse"; 49 50 # Create pulse/client.conf even if PulseAudio is disabled so 51 # that we can disable the autospawn feature in programs that ··· 219 220 { target = "pulse/daemon.conf"; 221 source = writeText "daemon.conf" (lib.generators.toKeyValue {} cfg.daemon.config); } 222 + 223 + { target = "openal/alsoft.conf"; 224 + source = writeText "alsoft.conf" "drivers=pulse"; } 225 + 226 + { target = "libao.conf"; 227 + source = writeText "libao.conf" "default_driver=pulse"; } 228 ]; 229 230 # Allow PulseAudio to get realtime priority using rtkit.