aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-08 08:03:50 +0900
committerOphestra <cat@gensokyo.uk>2025-12-08 08:53:04 +0900
commit87781c765844409226804157546753b84ef3c6b4 (patch)
tree4fa7bdbe890979badada6c36183a2ff25b7b85a8 /hst
parent0c38fb7b6a17bed9392a4cf46fc752bc2de8eb18 (diff)
treewide: include PipeWire op and enforce PulseAudio check
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>
Diffstat (limited to 'hst')
-rw-r--r--hst/config.go6
-rw-r--r--hst/config_test.go2
-rw-r--r--hst/hst.go2
-rw-r--r--hst/hst_test.go3
4 files changed, 5 insertions, 8 deletions
diff --git a/hst/config.go b/hst/config.go
index 23c21ccf..5032471b 100644
--- a/hst/config.go
+++ b/hst/config.go
@@ -109,11 +109,9 @@ func (config *Config) Validate() error {
}
}
- // EPulse without EPipeWire is insecure
- if et := config.Enablements.Unwrap(); !config.DirectPulse &&
- et&EPipeWire == 0 && et&EPulse != 0 {
+ if et := config.Enablements.Unwrap(); !config.DirectPulse && et&EPulse != 0 {
return &AppError{Step: "validate configuration", Err: ErrInsecure,
- Msg: "enablement PulseAudio requires PipeWire, which is not set"}
+ Msg: "enablement PulseAudio is insecure and no longer supported"}
}
return nil
diff --git a/hst/config_test.go b/hst/config_test.go
index 731a1317..776c21e9 100644
--- a/hst/config_test.go
+++ b/hst/config_test.go
@@ -58,7 +58,7 @@ func TestConfigValidate(t *testing.T) {
Shell: fhs.AbsTmp,
Path: fhs.AbsTmp,
}}, &hst.AppError{Step: "validate configuration", Err: hst.ErrInsecure,
- Msg: "enablement PulseAudio requires PipeWire, which is not set"}},
+ Msg: "enablement PulseAudio is insecure and no longer supported"}},
{"valid", &hst.Config{Container: &hst.ContainerConfig{
Home: fhs.AbsTmp,
Shell: fhs.AbsTmp,
diff --git a/hst/hst.go b/hst/hst.go
index 94bcd09d..439f4b2d 100644
--- a/hst/hst.go
+++ b/hst/hst.go
@@ -70,7 +70,7 @@ func Template() *Config {
return &Config{
ID: "org.chromium.Chromium",
- Enablements: NewEnablements(EWayland | EDBus | EPipeWire | EPulse),
+ Enablements: NewEnablements(EWayland | EDBus | EPipeWire),
SessionBus: &BusConfig{
See: nil,
diff --git a/hst/hst_test.go b/hst/hst_test.go
index 01d229fe..e3b98614 100644
--- a/hst/hst_test.go
+++ b/hst/hst_test.go
@@ -105,8 +105,7 @@ func TestTemplate(t *testing.T) {
"enablements": {
"wayland": true,
"dbus": true,
- "pipewire": true,
- "pulse": true
+ "pipewire": true
},
"session_bus": {
"see": null,