Update configuration and dev-iso

dev-iso now mirrors both in function, setup and organization iso-config.

configuration.nix has been updated to ensure PipeWire audio controls, and pin sink volumes to 100%.
This commit is contained in:
NeilClack
2026-08-07 00:38:25 -05:00
parent 2209f90c5a
commit 2d4aca230d
2 changed files with 63 additions and 37 deletions
+26 -5
View File
@@ -115,25 +115,46 @@ in
services.pipewire = { enable = true; alsa.enable = true; pulse.enable = true; };
# --- Pin system audio to 100% before RadiantWave launches ---
# New sinks with no stored volume default to ~40% in WirePlumber 0.5+.
# Force every newly-created sink to 100% so switching the default sink
# never changes the volume.
services.pipewire.wireplumber.extraConfig."99-kiosk-audio" = {
"wireplumber.settings"."device.routes.default-sink-volume" = 1.0;
};
# --- Pin all system audio sinks to 100% before RadiantWave launches ---
# User unit (PipeWire runs per-user in the kiosk session), owned by this
# system config. Ordered after PipeWire/WirePlumber; the retry loop covers
# default-sink readiness at boot. RadiantWave's loginShellInit waits on this
# before exec'ing cage.
# sink readiness at boot. Pins every connected sink (not just the default)
# and unmutes them, so switching the default sink never changes the volume.
# RadiantWave's loginShellInit waits on this before exec'ing cage.
systemd.user.services.radiantwave-audio-init = {
description = "Pin system audio volume to 100% and unmute";
description = "Pin all system audio sinks to 100% and unmute";
after = [ "pipewire.service" "wireplumber.service" ];
wants = [ "pipewire.service" "wireplumber.service" ];
serviceConfig = {
Type = "oneshot";
};
script = ''
# Wait until WirePlumber exposes at least one sink
sinks=""
for i in {1..30}; do
if ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 1.0 2>/dev/null; then
sinks=$(${pkgs.wireplumber}/bin/wpctl list audio sinks 2>/dev/null \
| ${pkgs.gnused}/bin/sed -nE 's/^.*[^0-9]([0-9]+)\. .*$/\1/p')
if [ -n "$sinks" ]; then
break
fi
sleep 1
done
# Pin and unmute every connected sink
for sink_id in $sinks; do
${pkgs.wireplumber}/bin/wpctl set-volume "$sink_id" 1.0 2>/dev/null || true
${pkgs.wireplumber}/bin/wpctl set-mute "$sink_id" 0 2>/dev/null || true
done
# Fallback in case the sink list came up empty
${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 1.0 2>/dev/null || true
${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 2>/dev/null || true
'';
};