From b657206f15bde34f321d5cc96177d2b0f357feaa Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Mon, 22 Jan 2024 10:56:31 +0100 Subject: [PATCH] fix: add whonix dvm --- salt/whonix/README.md | 2 ++ salt/whonix/appmenus.sls | 10 ++++++++++ salt/whonix/appmenus.top | 10 ++++++++++ salt/whonix/create.sls | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 salt/whonix/appmenus.sls create mode 100644 salt/whonix/appmenus.top diff --git a/salt/whonix/README.md b/salt/whonix/README.md index 5e2423a..b20e3f9 100644 --- a/salt/whonix/README.md +++ b/salt/whonix/README.md @@ -20,6 +20,7 @@ Template based on it. qubesctl top.enable whonix qubesctl --targets=whonix-workstation-17,whonix-gateway-17 state.apply qubesctl top.disable whonix +qubesctl state.apply whonix.appmenus ``` - State: @@ -27,6 +28,7 @@ qubesctl top.disable whonix ```sh qubesctl state.apply whonix.create qubesctl --skip-dom0 --targets=whonix-workstation-17,whonix-gateway-17 state.apply whonix.install +qubesctl state.apply whonix.appmenus ``` diff --git a/salt/whonix/appmenus.sls b/salt/whonix/appmenus.sls new file mode 100644 index 0000000..0006ccf --- /dev/null +++ b/salt/whonix/appmenus.sls @@ -0,0 +1,10 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +{%- import slsdotpath ~ "/template.jinja" as template -%} + +{% from 'utils/macros/sync-appmenus.sls' import sync_appmenus -%} +{{ sync_appmenus('dvm-' ~ template.whonix_workstation_clean_template) }} diff --git a/salt/whonix/appmenus.top b/salt/whonix/appmenus.top new file mode 100644 index 0000000..2718ec1 --- /dev/null +++ b/salt/whonix/appmenus.top @@ -0,0 +1,10 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +base: + 'dom0': + - match: nodegroup + - whonix.appmenus diff --git a/salt/whonix/create.sls b/salt/whonix/create.sls index 1b8afa8..1f33774 100644 --- a/salt/whonix/create.sls +++ b/salt/whonix/create.sls @@ -43,6 +43,36 @@ features: {%- endload %} {{ load(defaults) }} +{% load_yaml as defaults -%} +name: dvm-{{ template.whonix_workstation_clean_template }} +force: True +require: +- qvm: sys-{{ slsdotpath }} +- qvm: anon-{{ slsdotpath }} +present: +- template: {{ template.whonix_workstation_template }} +- label: red +prefs: +- template: {{ template.whonix_workstation_template }} +- label: red +- netvm: sys-{{ slsdotpath }} +- audiovm: "" +- default_dispvm: dvm-{{ template.whonix_workstation_clean_template }} +- vcpus: 1 +- memory: 300 +- maxmem: 1500 +- template_for_dispvms: True +- include_in_backups: False +- autostart: False +features: +- enable: + - appmenus-dispvm +tags: +- add: + - anon-vm +{%- endload %} +{{ load(defaults) }} + {% load_yaml as defaults -%} name: sys-{{ slsdotpath }} force: True @@ -56,6 +86,7 @@ prefs: - template: {{ template.whonix_gateway_template }} - label: black - audiovm: "" +- default_dispvm: dvm-{{ template.whonix_workstation_clean_template }} - vcpus: 1 - memory: 300 - maxmem: 500 @@ -68,6 +99,7 @@ tags: {%- endload %} {{ load(defaults) }} + {% load_yaml as defaults -%} name: anon-{{ slsdotpath }} force: True @@ -83,6 +115,7 @@ prefs: - label: red - netvm: sys-{{ slsdotpath }} - audiovm: "" +- default_dispvm: dvm-{{ template.whonix_workstation_clean_template }} - vcpus: 1 - memory: 300 - maxmem: 1500