about summary refs log tree commit diff stats
path: root/system/sound
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-04-04 09:08:02 +0200
committerene <ene@sils.li>2023-04-04 09:08:02 +0200
commit8820795608f996e91ca4b8c1e81aed31c59f9a3a (patch)
tree4da28536b51385a03a0e92e788a6692fd4b69cdc /system/sound
parentFix(hm/conf/alacritty): Ignore spaces in regex (diff)
downloadnixos-config-8820795608f996e91ca4b8c1e81aed31c59f9a3a.tar.gz
nixos-config-8820795608f996e91ca4b8c1e81aed31c59f9a3a.zip
Fix(system/audio): Configure default volume in ppa
Diffstat (limited to 'system/sound')
-rw-r--r--system/sound/default.nix24
1 files 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%" }
+      ]
+    '';
   };
 }