I’ve just installed NixOS on my previously Arch Linux desktop and I’m in the progress of migrating the setup. Currently have some issues with Pulseaudio.
By default, Pulseaudio loads module-role-cork which mutes audio streams (e.g. MPD) when a phone stream (e.g. Teamspeak) is active. On Arch, the line containing this module was simply commented out of /etc/pulse/default.pa, but I’m unsure how I should do it on NixOS; especially when there seems to be no option for it suitable in hardware.pulseaudio.daemon.config.
So it looks like the default config loads the config from the package, with loads module-role-cork.
Looking at NixOS Search it looks like the target is actually configurable.
So now we have a problem. We could replace the file entirely but it would mean re-writing the whole config file. One solution is to take the original file and wrap it in a derivation to grep out the module-role-cork: