From 8820795608f996e91ca4b8c1e81aed31c59f9a3a Mon Sep 17 00:00:00 2001 From: ene Date: Tue, 4 Apr 2023 09:08:02 +0200 Subject: Fix(system/audio): Configure default volume in ppa --- system/sound/default.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/system/sound/default.nix b/system/sound/default.nix index 699f786a..64465893 100644 --- a/system/sound/default.nix +++ b/system/sound/default.nix @@ -1,23 +1,23 @@ -{config, ...}: { +{...}: { # Enable sound with pipewire. sound.enable = true; - hardware.pulseaudio = { - enable = false; - extraConfig = '' - set-sink-volume 0 13% # set the default volume - ''; - }; + hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; + }; + environment.etc.pipewire-pulse-config = { + target = "pipewire/pipewire-pulse.conf.d/pipewire-pulse-config.conf"; + text = '' + # Extra scripts can be started here. Setup in default.pa can be moved in + # a script or in pulse.cmd below + context.exec = [ + { path = "pactl" args = "set-sink-volume 0 13%" } + ] + ''; }; } -- cgit 1.4.1