summary refs log tree commit diff
path: root/nixos/modules/config/pulseaudio.nix
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@users.noreply.github.com>2019-01-27 14:24:12 -0500
committerworldofpeace <worldofpeace@users.noreply.github.com>2019-01-27 19:51:26 +0000
commitdc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff (patch)
treec85f03c384e4ea07615a9039b6be3d381ddb3caa /nixos/modules/config/pulseaudio.nix
parent022c0165c293fd74d908ce1355edf9e23de3fad3 (diff)
downloadnixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.tar
nixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.tar.gz
nixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.tar.bz2
nixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.tar.lz
nixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.tar.xz
nixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.tar.zst
nixpkgs-dc923b6ad15dd60f4d18e5a8e3f7f211bc0246ff.zip
nixos/pulseaudio: disable flat-volumes by default
The motivation for this is that some applications are unaware
of this feature and can set their volume to 100% on startup
harming people ears and possiblly blowing someone's audio
setup.

I noticed this in #54594 and by extension epiphany[0].

Please also note that many other distros have this default for
the reason outlined above.

Closes #5632 #54594

[0]: https://bugzilla.gnome.org/show_bug.cgi?id=675217
Diffstat (limited to 'nixos/modules/config/pulseaudio.nix')
-rw-r--r--nixos/modules/config/pulseaudio.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix
index 67f7105fe2f..e61a3a73120 100644
--- a/nixos/modules/config/pulseaudio.nix
+++ b/nixos/modules/config/pulseaudio.nix
@@ -180,7 +180,7 @@ in {
           type = types.attrsOf types.unspecified;
           default = {};
           description = ''Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.'';
-          example = literalExample ''{ flat-volumes = "no"; }'';
+          example = literalExample ''{ realtime-scheduling = "yes"; }'';
         };
       };
 
@@ -242,6 +242,9 @@ in {
           source = writeText "libao.conf" "default_driver=pulse"; }
       ];
 
+      # Disable flat volumes to enable relative ones
+      hardware.pulseaudio.daemon.config.flat-volumes = mkDefault "no";
+
       # Allow PulseAudio to get realtime priority using rtkit.
       security.rtkit.enable = true;