summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-02 04:38:58 +0000
committertv <tv@krebsco.de>2026-12-02 04:38:58 +0000
commit4313cb0e66b7e056f04457fba59012e22f63f04b (patch)
tree5df6b7f16ea7a30091039c6e151f220b69718910
parent7fb63f24e7565cab36bad88e320efaa9e22641d5 (diff)
bu: PipeWire instead of PulseAudio
configs/pipewire.nix runs it system-wide, as configs/pulse.nix did PulseAudio, so that several users can play audio at the same time. Instead of its anonymous socket, the sockets are for the group pipewire, which the host's build user joins. Clients learn the sockets' places from PIPEWIRE_RUNTIME_DIR and PULSE_SERVER. Without the tunnel to au, for now.
-rw-r--r--configs/pipewire.nix28
-rw-r--r--systems/bu/config.nix2
2 files changed, 29 insertions, 1 deletions
diff --git a/configs/pipewire.nix b/configs/pipewire.nix
new file mode 100644
index 00000000..1331d5fc
--- /dev/null
+++ b/configs/pipewire.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }: let
+ # Where system-wide PipeWire's sockets are, as clients need to be told.
+ environment = {
+ PIPEWIRE_RUNTIME_DIR = "/run/pipewire";
+ PULSE_SERVER = "unix:/run/pulse/native";
+ };
+in {
+ # System-wide, so that several users can play audio at the same time.
+ # Its sockets are for the group pipewire.
+ services.pipewire = {
+ enable = true;
+ systemWide = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+
+ security.rtkit.enable = true;
+
+ environment.sessionVariables = environment;
+ systemd.globalEnvironment = environment;
+
+ environment.systemPackages = lib.optionals config.services.xserver.enable [
+ pkgs.pwvucontrol
+ ];
+
+ users.users.${config.krebs.build.user.name}.extraGroups = [ "pipewire" ];
+}
diff --git a/systems/bu/config.nix b/systems/bu/config.nix
index 39d1007d..5762a1dd 100644
--- a/systems/bu/config.nix
+++ b/systems/bu/config.nix
@@ -4,7 +4,7 @@
../../configs/hw/x220.nix
../../configs/exim-retiolum.nix
../../configs/gitconfig.nix
- ../../configs/pulse.nix
+ ../../configs/pipewire.nix
../../configs/retiolum.nix
../../configs/xsessions
];