nixos/pulseaudio: make daemon.conf configurable (#20888)
This adds pulseaudio.daemon.config, which is a set of keys to values which are directly translated to keys and values of pulseaudio's daemon.conf, e. g. hardware.pulseaudio.daemon.config = { flat-volumes = "no"; } becomes flat-volumes=no in pulse/daemon.conf.
This commit is contained in:
parent
235da0d77b
commit
9f56dd9d63
@ -160,6 +160,13 @@ in {
|
||||
if activated.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = types.attrsOf types.unspecified;
|
||||
default = {};
|
||||
description = ''Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.'';
|
||||
example = literalExample ''{ flat-volumes = "no"; }'';
|
||||
};
|
||||
};
|
||||
|
||||
zeroconf = {
|
||||
@ -204,10 +211,13 @@ in {
|
||||
(mkIf cfg.enable {
|
||||
environment.systemPackages = [ overriddenPackage ];
|
||||
|
||||
environment.etc = singleton {
|
||||
target = "asound.conf";
|
||||
source = alsaConf;
|
||||
};
|
||||
environment.etc = [
|
||||
{ target = "asound.conf";
|
||||
source = alsaConf; }
|
||||
|
||||
{ target = "pulse/daemon.conf";
|
||||
source = writeText "daemon.conf" (lib.generators.toKeyValue {} cfg.daemon.config); }
|
||||
];
|
||||
|
||||
# Allow PulseAudio to get realtime priority using rtkit.
|
||||
security.rtkit.enable = true;
|
||||
|
Loading…
Reference in New Issue
Block a user