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
commite8838a4449ebe2a396469a18395de6427a255cc5 (patch)
tree2fce48ab9bbc280828c7e3bdab6f87bb43a6ef19
parentbe91345d6966997f97a33a5c72bf4d6db3db60d5 (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
];
[cgit] Unable to lock slot /tmp/cgit/7e000000.lock: Permission denied (13)