From f6cb322f5afe68e9a527ce375cd441e17fb809bb Mon Sep 17 00:00:00 2001
From: Ben Grande <ben.grande.b@gmail.com>
Date: Sun, 31 Dec 2023 07:52:38 +0100
Subject: [PATCH] fix: customize sys-whonix

- autostart set to false;
- lower vcpus available;
- lower total memory; and
- use state provided by upstream;
---
 salt/whonix/create.sls | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/salt/whonix/create.sls b/salt/whonix/create.sls
index 2a2685f..97350f7 100644
--- a/salt/whonix/create.sls
+++ b/salt/whonix/create.sls
@@ -4,7 +4,29 @@ SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
 SPDX-License-Identifier: AGPL-3.0-or-later
 #}
 
+{%- from "qvm/template.jinja" import load -%}
+
+{%- import slsdotpath ~ "/template.jinja" as template -%}
+
 include:
-  - whonix.clone
+  - .clone
   - qvm.anon-whonix
-  - qvm.whonix-workstation-dvm
+
+{% load_yaml as defaults -%}
+name: sys-{{ slsdotpath }}
+force: True
+require:
+- sls: {{ slsdotpath }}.clone
+present:
+- template: {{ template.whonix_gateway_template }}
+- label: black
+prefs:
+- template: {{ template.whonix_gateway_template }}
+- label: black
+- memory: 300
+- maxmem: 500
+- vcpus: 1
+- include_in_backups: False
+- autostart: False
+{%- endload %}
+{{ load(defaults) }}