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 45 uid = ids.uids.pulseaudio; 46 46 gid = ids.gids.pulseaudio; 47 47 48 - stateDir = "/var/run/pulse"; 48 + stateDir = "/run/pulse"; 49 49 50 50 # Create pulse/client.conf even if PulseAudio is disabled so 51 51 # that we can disable the autospawn feature in programs that ··· 219 219 220 220 { target = "pulse/daemon.conf"; 221 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"; } 222 228 ]; 223 229 224 230 # Allow PulseAudio to get realtime priority using rtkit.