fix: disposable sys-audio name with disp prefix

This commit is contained in:
Ben Grande 2024-01-14 14:05:17 +01:00
parent ff4773bf8e
commit c3937e881e
8 changed files with 44 additions and 47 deletions

View File

@ -5,13 +5,9 @@ Source: https://github.com/ben-grande/qusal
Files: BOOTSTRAP.md CONTRIBUTING.md README.md */README.md
.github/ISSUE_TEMPLATE/*
Copyright: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
Copyright: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
License: CC-BY-SA-4.0
Files: */rc.local
Copyright: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
License: GPL-3.0-or-later
Files: salt/sys-mirage-firewall/files/admin/mirage-firewall.tar.bz2
salt/sys-mirage-firewall/files/admin/mirage-firewall.sha256
salt/sys-mirage-firewall/files/admin/version.txt

View File

@ -61,7 +61,7 @@ Qubes global settings (qubes-prefs) that will be managed:
- **default_netvm**: sys-pihole, sys-firewall or disp-sys-firewall
- **management_dispvm**: dvm-mgmt
- **updatevm**: sys-pihole, sys-firewall or disp-sys-firewall
- **default_audiovm**: sys-audio
- **default_audiovm**: disp-sys-audio
To be implemented:
- **default_guivm**: sys-gui

View File

@ -8,15 +8,15 @@ Audio operations in Qubes OS.
* [Installation](#installation)
* [Usage](#usage)
* [Audio control](#audio-control)
* [Client started before sys-audio](#client-started-before-sys-audio)
* [Client started before it's AudioVM](#client-started-before-its-audiovm)
* [Client turned off with a device attached](#client-turned-off-with-a-device-attached)
## Description
Creates the "sys-audio" qube for providing audio operations such as microphone
and speakers to and from qubes. By default, you can use wired USB audio, but
if you want, you can install the necessary packages for bluetooth with the
provided state.
Creates the named disposable "disp-sys-audio" qube for providing audio
operations such as microphone and speakers to and from qubes. By default, you
can use wired USB audio, but if you want, you can install the necessary
packages for bluetooth with the provided state.
## Installation
@ -45,7 +45,7 @@ qubesctl --skip-dom0 --targets=tpl-sys-audio state.apply sys-audio.install-bluet
### Audio control
The qube `sys-audio` will be used for audio capabilities for speakers and
The qube `disp-sys-audio` will be used for audio capabilities for speakers and
microphone, with builtin modules, Jack port or Bluetooth. You are be able to
control the volume via the volume icon that appears on the system tray.
@ -57,10 +57,10 @@ The basics are very simple to use:
For more advanced features, right click the icon and click on `Open Mixer` or
`Prefences`. For greater control, use the command `amixer`.
### Client started before sys-audio
### Client started before it's AudioVM
Audio will not automatically connect if sys-audio starts after the client. To
connect the client to audio server, restart the client's pipewire service:
Audio will not automatically connect if the AudioVM starts after the client.
To connect the client to audio server, restart the client's Pipewire service:
```sh
systemctl --user restart pipewire
```
@ -71,6 +71,6 @@ If you shutdown a client qube with a device attached, such as a microphone or
speaker, normal operation to attach the device to the same or any other qube
will fail. To be able to use the device again:
- Restart the audio server `sys-audio`;
- Restart the audio server `disp-sys-audio`;
- Restart the audio client; and
- Attach the device to the audio client;

View File

@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}

View File

@ -1,10 +1,9 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'*':
- match: nodegroup
'dvm-sys-audio':
- sys-audio.configure-dvm

View File

@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
@ -40,7 +40,7 @@ features:
{% set audio_pcidevs = salt['grains.get']('pci_audio_devs', []) -%}
{% load_yaml as defaults -%}
name: {{ slsdotpath }}
name: disp-{{ slsdotpath }}
force: True
require:
- qvm: dvm-{{ slsdotpath }}
@ -65,14 +65,17 @@ features:
- service.cups-browsed
- service.meminfo-writer
- service.qubes-updates-proxy
tags:
- add:
- audiovm
{%- endload %}
{{ load(defaults) }}
"{{ slsdotpath }}-default_audiovm":
"disp-{{ slsdotpath }}-default_audiovm":
cmd.run:
- require:
- qvm: {{ slsdotpath }}
- name: qubes-prefs default_audiovm {{ slsdotpath }}
- qvm: disp-{{ slsdotpath }}
- name: qubes-prefs default_audiovm disp-{{ slsdotpath }}
{% from 'utils/macros/policy.sls' import policy_set with context -%}
{{ policy_set(sls_path, '80') }}

View File

@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
# SPDX-FileCopyrightText: 2023 Yukikoo neowutran <https://neowutran.ovh>
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
@ -8,29 +8,29 @@
## Do not modify this file, create a new policy with with a lower number in the
## file name instead. For example `30-user.policy`.
admin.vm.device.mic.Available * sys-audio @adminvm allow target=dom0
admin.vm.device.mic.Available * disp-{{ sls_path }} @adminvm allow target=dom0
admin.Events * sys-audio sys-audio allow target=dom0
admin.Events * sys-audio @adminvm allow target=dom0
admin.Events * sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.Events * disp-{{ sls_path }} disp-{{ sls_path }} allow target=dom0
admin.Events * disp-{{ sls_path }} @adminvm allow target=dom0
admin.Events * disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.CurrentState * sys-audio sys-audio allow target=dom0
admin.vm.CurrentState * sys-audio @adminvm allow target=dom0
admin.vm.CurrentState * sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.CurrentState * disp-{{ sls_path }} disp-{{ sls_path }} allow target=dom0
admin.vm.CurrentState * disp-{{ sls_path }} @adminvm allow target=dom0
admin.vm.CurrentState * disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.List * sys-audio sys-audio allow target=dom0
admin.vm.List * sys-audio @adminvm allow target=dom0
admin.vm.List * sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.List * disp-{{ sls_path }} disp-{{ sls_path }} allow target=dom0
admin.vm.List * disp-{{ sls_path }} @adminvm allow target=dom0
admin.vm.List * disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.property.Get +audiovm sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.property.Get +xid sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.property.Get +stubdom_xid sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.property.Get +audiovm disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.property.Get +xid disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.property.Get +stubdom_xid disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.feature.CheckWithTemplate +audio sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.feature.CheckWithTemplate +audio-model sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.feature.CheckWithTemplate +supported-service.pipewire sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.feature.CheckWithTemplate +audio-low-latency sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.feature.CheckWithTemplate +audio disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.feature.CheckWithTemplate +audio-model disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.feature.CheckWithTemplate +supported-service.pipewire disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.feature.CheckWithTemplate +audio-low-latency disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
admin.vm.property.GetAll * sys-audio sys-audio allow target=dom0
admin.vm.property.GetAll * sys-audio @tag:audiovm-sys-audio allow target=dom0
admin.vm.property.GetAll * disp-{{ sls_path }} disp-{{ sls_path }} allow target=dom0
admin.vm.property.GetAll * disp-{{ sls_path }} @tag:audiovm-disp-{{ sls_path }} allow target=dom0
## vim:ft=qrexecpolicy

View File

@ -1,10 +1,9 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'tpl-sys-audio':
- match: list
- sys-audio.install