Allowing multiple users to use PulseAudio at the same time


How can NixOS be configured so that programs run as another user on the same desktop of the primary user can connect to PulseAudio?



It seems to be possible to configure PulseAudio to allow this without enabling it system wide, as it is commented in the arch wiki.

How would one adapt this setup for NixOS in configuration.nix?