mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-03 11:46:20 -04:00
refactor: initial commit
This commit is contained in:
commit
5eebd789ed
591 changed files with 18598 additions and 0 deletions
34
salt/debian/README.md
Normal file
34
salt/debian/README.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# debian
|
||||
|
||||
Debian Template in Qubes OS.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Description](#description)
|
||||
* [Installation](#installation)
|
||||
* [Usage](#usage)
|
||||
|
||||
## Description
|
||||
|
||||
Creates the Debian template as well as a Disposable Template based on it.
|
||||
|
||||
## Installation
|
||||
|
||||
- Top:
|
||||
```sh
|
||||
qubesctl top.enable debian
|
||||
qubesctl --targets=debian-12 state.apply
|
||||
qubesctl top.disable debian
|
||||
```
|
||||
|
||||
- State:
|
||||
<!-- pkg:begin:post-install -->
|
||||
```sh
|
||||
qubesctl state.apply debian.create
|
||||
qubesctl --skip-dom0 --targets=debian-12 state.apply debian.install
|
||||
```
|
||||
<!-- pkg:end:post-install -->
|
||||
|
||||
## Usage
|
||||
|
||||
AppVMs and StandaloneVMs can be based on this template.
|
12
salt/debian/clone.sls
Normal file
12
salt/debian/clone.sls
Normal file
|
@ -0,0 +1,12 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{%- import slsdotpath ~ "/template.jinja" as template -%}
|
||||
|
||||
"{{ template.template }}-template-installed":
|
||||
qvm.template_installed:
|
||||
- name: {{ template.template }}
|
||||
- fromrepo: {{ template.repo }}
|
10
salt/debian/clone.top
Normal file
10
salt/debian/clone.top
Normal file
|
@ -0,0 +1,10 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- debian.clone
|
63
salt/debian/create.sls
Normal file
63
salt/debian/create.sls
Normal file
|
@ -0,0 +1,63 @@
|
|||
{#
|
||||
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:
|
||||
- .clone
|
||||
|
||||
"dvm-{{ template.template }}-absent":
|
||||
qvm.absent:
|
||||
- names:
|
||||
- dvm-{{ template.template_clean }}
|
||||
- {{ template.template_clean }}-dvm
|
||||
- {{ template.template }}-dvm
|
||||
|
||||
{% load_yaml as defaults -%}
|
||||
name: dvm-{{ template.template_clean }}
|
||||
force: True
|
||||
require:
|
||||
- sls: {{ slsdotpath }}.clone
|
||||
present:
|
||||
- template: {{ template.template }}
|
||||
- label: red
|
||||
prefs:
|
||||
- template: {{ template.template }}
|
||||
- label: red
|
||||
- memory: 300
|
||||
- maxmem: 800
|
||||
- vcpus: 1
|
||||
- template_for_dispvms: True
|
||||
- include_in_backups: False
|
||||
features:
|
||||
- enable:
|
||||
- appmenus-dispvm
|
||||
- set:
|
||||
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
|
||||
{%- endload %}
|
||||
{{ load(defaults) }}
|
||||
|
||||
{% load_yaml as defaults -%}
|
||||
name: {{ template.template_clean }}
|
||||
force: True
|
||||
require:
|
||||
- sls: {{ slsdotpath }}.clone
|
||||
present:
|
||||
- label: black
|
||||
prefs:
|
||||
- label: black
|
||||
- memory: 300
|
||||
- maxmem: 600
|
||||
- vcpus: 1
|
||||
- include_in_backups: False
|
||||
features:
|
||||
- set:
|
||||
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
|
||||
- default-menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
|
||||
{%- endload %}
|
||||
{{ load(defaults) }}
|
10
salt/debian/create.top
Normal file
10
salt/debian/create.top
Normal file
|
@ -0,0 +1,10 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- debian.create
|
13
salt/debian/init.top
Normal file
13
salt/debian/init.top
Normal file
|
@ -0,0 +1,13 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'dom0':
|
||||
- match: nodegroup
|
||||
- debian.create
|
||||
'I@qubes:type:template and E@^debian-[0-9][0-9]$':
|
||||
- match: compound
|
||||
- debian.install
|
13
salt/debian/install.sls
Normal file
13
salt/debian/install.sls
Normal file
|
@ -0,0 +1,13 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% if grains['nodename'] != 'dom0' -%}
|
||||
|
||||
"{{ slsdotpath }}-updated":
|
||||
pkg.uptodate:
|
||||
- refresh: True
|
||||
|
||||
{% endif %}
|
10
salt/debian/install.top
Normal file
10
salt/debian/install.top
Normal file
|
@ -0,0 +1,10 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
base:
|
||||
'I@qubes:type:template and E@^debian-[0-9][0-9]$':
|
||||
- match: compound
|
||||
- debian.install
|
10
salt/debian/template.jinja
Normal file
10
salt/debian/template.jinja
Normal file
|
@ -0,0 +1,10 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% set version = salt['pillar.get']('qvm:debian:version', '12') -%}
|
||||
{% set repo = salt['pillar.get']('qvm:debian:repo', 'qubes-templates-itl') -%}
|
||||
{% set template = 'debian-' ~ version -%}
|
||||
{% set template_clean = 'debian' -%}
|
Loading…
Add table
Add a link
Reference in a new issue