From fcc155f5c76d3a13dbb9027d2e5954d1ec218b01 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Sat, 23 Mar 2024 22:18:45 +0100 Subject: [PATCH] feat: optional state to autostart AudioVM Not the default because it is unnecessary to autostart AudioVM as audio is not necessary for everyone on every boot. Fixes: https://github.com/ben-grande/qusal/issues/39 --- salt/sys-audio/README.md | 5 +++++ salt/sys-audio/autostart.sls | 11 +++++++++++ salt/sys-audio/autostart.top | 10 ++++++++++ 3 files changed, 26 insertions(+) create mode 100644 salt/sys-audio/autostart.sls create mode 100644 salt/sys-audio/autostart.top diff --git a/salt/sys-audio/README.md b/salt/sys-audio/README.md index d0e831c2..c03f50af 100644 --- a/salt/sys-audio/README.md +++ b/salt/sys-audio/README.md @@ -41,6 +41,11 @@ sudo qubesctl --skip-dom0 --targets=dvm-sys-audio state.apply sys-audio.configur ``` +If you want to autostart the AudioVM on boot, you may run: +```sh +sudo qubesctl state.apply sys-audio.autostart +``` + If you need Bluetooth support, install the dependencies: ```sh sudo qubesctl --skip-dom0 --targets=tpl-sys-audio state.apply sys-audio.install-bluetooth diff --git a/salt/sys-audio/autostart.sls b/salt/sys-audio/autostart.sls new file mode 100644 index 00000000..75908732 --- /dev/null +++ b/salt/sys-audio/autostart.sls @@ -0,0 +1,11 @@ +{# +SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +"{{ slsdotpath }}-autostart-audiovm": + qvm.vm: + - name: disp-{{ slsdotpath }} + - prefs: + - autostart: True diff --git a/salt/sys-audio/autostart.top b/salt/sys-audio/autostart.top new file mode 100644 index 00000000..8c77af73 --- /dev/null +++ b/salt/sys-audio/autostart.top @@ -0,0 +1,10 @@ +{# +SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +base: + 'dom0': + - match: nodegroup + - sys-audio.autostart