treewide: include PipeWire op and enforce PulseAudio check
All checks were successful
Test / Create distribution (push) Successful in 29s
Test / Sandbox (push) Successful in 40s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Hakurei (push) Successful in 44s
Test / Hpkg (push) Successful in 41s
Test / Hakurei (race detector) (push) Successful in 45s
Test / Flake checks (push) Successful in 1m29s
All checks were successful
Test / Create distribution (push) Successful in 29s
Test / Sandbox (push) Successful in 40s
Test / Sandbox (race detector) (push) Successful in 41s
Test / Hakurei (push) Successful in 44s
Test / Hpkg (push) Successful in 41s
Test / Hakurei (race detector) (push) Successful in 45s
Test / Flake checks (push) Successful in 1m29s
This fully replaces PulseAudio with PipeWire and enforces the PulseAudio check and error message. The pipewire-pulse daemon is handled in the NixOS module. Closes #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
_ "unsafe" // for go:linkname
|
||||
|
||||
"hakurei.app/command"
|
||||
"hakurei.app/container"
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/container/fhs"
|
||||
"hakurei.app/hst"
|
||||
@@ -149,9 +150,6 @@ func buildCommand(ctx context.Context, msg message.Msg, early *earlyHardeningErr
|
||||
if flagPipeWire || flagPulse {
|
||||
et |= hst.EPipeWire
|
||||
}
|
||||
if flagPulse {
|
||||
et |= hst.EPulse
|
||||
}
|
||||
|
||||
config := &hst.Config{
|
||||
ID: flagID,
|
||||
@@ -189,6 +187,14 @@ func buildCommand(ctx context.Context, msg message.Msg, early *earlyHardeningErr
|
||||
}})
|
||||
}
|
||||
|
||||
// start pipewire-pulse: this most likely exists on host if PipeWire is available
|
||||
if flagPulse {
|
||||
config.Container.Filesystem = append(config.Container.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSDaemon{
|
||||
Target: fhs.AbsRunUser.Append(strconv.Itoa(container.OverflowUid(msg)), "pulse/native"),
|
||||
Exec: shell, Args: []string{"-lc", "pipewire-pulse"},
|
||||
}})
|
||||
}
|
||||
|
||||
config.Container.Filesystem = append(config.Container.Filesystem,
|
||||
// opportunistically bind kvm
|
||||
hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{
|
||||
|
||||
@@ -62,7 +62,7 @@ func TestPrintShowInstance(t *testing.T) {
|
||||
{"nil", nil, nil, false, false, "Error: invalid configuration!\n\n", false},
|
||||
{"config", nil, hst.Template(), false, false, `App
|
||||
Identity: 9 (org.chromium.Chromium)
|
||||
Enablements: wayland, dbus, pipewire, pulseaudio
|
||||
Enablements: wayland, dbus, pipewire
|
||||
Groups: video, dialout, plugdev
|
||||
Flags: multiarch, compat, devel, userns, net, abstract, tty, mapuid, device, runtime, tmpdir
|
||||
Home: /data/data/org.chromium.Chromium
|
||||
@@ -159,7 +159,7 @@ Session bus
|
||||
|
||||
App
|
||||
Identity: 9 (org.chromium.Chromium)
|
||||
Enablements: wayland, dbus, pipewire, pulseaudio
|
||||
Enablements: wayland, dbus, pipewire
|
||||
Groups: video, dialout, plugdev
|
||||
Flags: multiarch, compat, devel, userns, net, abstract, tty, mapuid, device, runtime, tmpdir
|
||||
Home: /data/data/org.chromium.Chromium
|
||||
@@ -215,8 +215,7 @@ App
|
||||
"enablements": {
|
||||
"wayland": true,
|
||||
"dbus": true,
|
||||
"pipewire": true,
|
||||
"pulse": true
|
||||
"pipewire": true
|
||||
},
|
||||
"session_bus": {
|
||||
"see": null,
|
||||
@@ -367,8 +366,7 @@ App
|
||||
"enablements": {
|
||||
"wayland": true,
|
||||
"dbus": true,
|
||||
"pipewire": true,
|
||||
"pulse": true
|
||||
"pipewire": true
|
||||
},
|
||||
"session_bus": {
|
||||
"see": null,
|
||||
@@ -566,8 +564,7 @@ func TestPrintPs(t *testing.T) {
|
||||
"enablements": {
|
||||
"wayland": true,
|
||||
"dbus": true,
|
||||
"pipewire": true,
|
||||
"pulse": true
|
||||
"pipewire": true
|
||||
},
|
||||
"session_bus": {
|
||||
"see": null,
|
||||
|
||||
Reference in New Issue
Block a user