mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
fix: separate template formula per flavor
Default template flavor is Gnome, installing Xfce when requesting the template formula without flavor causes confusion.
This commit is contained in:
parent
233ac76bcb
commit
5502103901
34
salt/debian-xfce/README.md
Normal file
34
salt/debian-xfce/README.md
Normal file
@ -0,0 +1,34 @@
|
||||
# debian
|
||||
|
||||
Debian Xfce Template in Qubes OS.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Description](#description)
|
||||
* [Installation](#installation)
|
||||
* [Usage](#usage)
|
||||
|
||||
## Description
|
||||
|
||||
Creates the Debian Xfce Template as well as a Disposable Template based on it.
|
||||
|
||||
## Installation
|
||||
|
||||
- Top:
|
||||
```sh
|
||||
qubesctl top.enable debian-xfce
|
||||
qubesctl --targets=debian-12-xfce state.apply
|
||||
qubesctl top.disable debian-xfce
|
||||
```
|
||||
|
||||
- State:
|
||||
<!-- pkg:begin:post-install -->
|
||||
```sh
|
||||
qubesctl state.apply debian-xfce.create
|
||||
qubesctl --skip-dom0 --targets=debian-12-xfce state.apply debian-xfce.install
|
||||
```
|
||||
<!-- pkg:end:post-install -->
|
||||
|
||||
## Usage
|
||||
|
||||
AppVMs and StandaloneVMs can be based on this template.
|
12
salt/debian-xfce/clone.sls
Normal file
12
salt/debian-xfce/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-xfce/clone.top
Normal file
10
salt/debian-xfce/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-xfce.clone
|
62
salt/debian-xfce/create.sls
Normal file
62
salt/debian-xfce/create.sls
Normal file
@ -0,0 +1,62 @@
|
||||
{#
|
||||
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:
|
||||
- {{ 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 }}
|
||||
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-xfce/create.top
Normal file
10
salt/debian-xfce/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-xfce.create
|
13
salt/debian-xfce/init.top
Normal file
13
salt/debian-xfce/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-xfce.create
|
||||
'I@qubes:type:template and E@^debian-[0-9][0-9]-xfce$':
|
||||
- match: compound
|
||||
- debian-xfce.install
|
13
salt/debian-xfce/install.sls
Normal file
13
salt/debian-xfce/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-xfce/install.top
Normal file
10
salt/debian-xfce/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]-xfce$':
|
||||
- match: compound
|
||||
- debian-xfce.install
|
15
salt/debian-xfce/template.jinja
Normal file
15
salt/debian-xfce/template.jinja
Normal file
@ -0,0 +1,15 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% set base = 'debian' -%}
|
||||
{% set version = salt['pillar.get']('qvm:debian:version', '12') -%}
|
||||
{% set flavor = 'xfce' -%}
|
||||
{% set repo = salt['pillar.get']('qvm:debian:repo', 'qubes-templates-itl') -%}
|
||||
{% if flavor -%}
|
||||
{% set flavor = '-' ~ flavor -%}
|
||||
{% endif -%}
|
||||
{% set template = base ~ '-' ~ version ~ flavor -%}
|
||||
{% set template_clean = base ~ flavor -%}
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
{% set base = 'debian' -%}
|
||||
{% set version = salt['pillar.get']('qvm:debian:version', '12') -%}
|
||||
{% set flavor = salt['pillar.get']('qvm:debian:flavor', 'xfce') -%}
|
||||
{% set flavor = '' -%}
|
||||
{% set repo = salt['pillar.get']('qvm:debian:repo', 'qubes-templates-itl') -%}
|
||||
{% if flavor -%}
|
||||
{% set flavor = '-' ~ flavor -%}
|
||||
|
34
salt/fedora-xfce/README.md
Normal file
34
salt/fedora-xfce/README.md
Normal file
@ -0,0 +1,34 @@
|
||||
# fedora
|
||||
|
||||
Fedora Xfce Template in Qubes OS.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Description](#description)
|
||||
* [Installation](#installation)
|
||||
* [Usage](#usage)
|
||||
|
||||
## Description
|
||||
|
||||
Creates the Fedora Xfce template as well as a Disposable Template based on it.
|
||||
|
||||
## Installation
|
||||
|
||||
- Top:
|
||||
```sh
|
||||
qubesctl top.enable fedora-xfce
|
||||
qubesctl --targets=fedora-38-xfce state.apply
|
||||
qubesctl top.disable fedora-xfce
|
||||
```
|
||||
|
||||
- State:
|
||||
<!-- pkg:begin:post-install -->
|
||||
```sh
|
||||
qubesctl state.apply fedora-xfce.create
|
||||
qubesctl --skip-dom0 --targets=fedora-38-xfce state.apply fedora-xfce.install
|
||||
```
|
||||
<!-- pkg:end:post-install -->
|
||||
|
||||
## Usage
|
||||
|
||||
AppVMs and StandaloneVMs can be based on this template.
|
12
salt/fedora-xfce/clone.sls
Normal file
12
salt/fedora-xfce/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/fedora-xfce/clone.top
Normal file
10
salt/fedora-xfce/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
|
||||
- fedora-xfce.clone
|
62
salt/fedora-xfce/create.sls
Normal file
62
salt/fedora-xfce/create.sls
Normal file
@ -0,0 +1,62 @@
|
||||
{#
|
||||
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:
|
||||
- {{ template.template_clean }}-dvm
|
||||
- {{ template.template }}-dvm
|
||||
|
||||
{% load_yaml as defaults -%}
|
||||
name: dvm-{{ template.template_clean }}
|
||||
force: True
|
||||
require:
|
||||
- sls: {{ template.template_clean }}.clone
|
||||
present:
|
||||
- template: {{ template.template }}
|
||||
- label: red
|
||||
prefs:
|
||||
- template: {{ template.template }}
|
||||
- label: red
|
||||
- memory: 300
|
||||
- maxmem: 400
|
||||
- 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 }}
|
||||
force: True
|
||||
require:
|
||||
- sls: {{ template.template_clean }}.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/fedora-xfce/create.top
Normal file
10
salt/fedora-xfce/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
|
||||
- fedora-xfce.create
|
13
salt/fedora-xfce/init.top
Normal file
13
salt/fedora-xfce/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
|
||||
- fedora-xfce.create
|
||||
'I@qubes:type:template and E@^fedora-[0-9][0-9]-xfce$':
|
||||
- match: compound
|
||||
- fedora-xfce.install
|
13
salt/fedora-xfce/install.sls
Normal file
13
salt/fedora-xfce/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/fedora-xfce/install.top
Normal file
10
salt/fedora-xfce/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@^fedora-[0-9][0-9]-xfce$':
|
||||
- match: compound
|
||||
- fedora-xfce.install
|
15
salt/fedora-xfce/template.jinja
Normal file
15
salt/fedora-xfce/template.jinja
Normal file
@ -0,0 +1,15 @@
|
||||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{% set base = 'fedora' -%}
|
||||
{% set version = salt['pillar.get']('qvm:fedora:version', '38') -%}
|
||||
{% set flavor = 'xfce' -%}
|
||||
{% set repo = salt['pillar.get']('qvm:fedora:repo', 'qubes-templates-itl') -%}
|
||||
{% if flavor -%}
|
||||
{% set flavor = '-' ~ flavor -%}
|
||||
{% endif -%}
|
||||
{% set template = base ~ '-' ~ version ~ flavor -%}
|
||||
{% set template_clean = base ~ flavor -%}
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
{% set base = 'fedora' -%}
|
||||
{% set version = salt['pillar.get']('qvm:fedora:version', '38') -%}
|
||||
{% set flavor = salt['pillar.get']('qvm:fedora:flavor', 'xfce') -%}
|
||||
{% set flavor = '' -%}
|
||||
{% set repo = salt['pillar.get']('qvm:fedora:repo', 'qubes-templates-itl') -%}
|
||||
{% if flavor -%}
|
||||
{% set flavor = '-' ~ flavor -%}
|
||||
|
Loading…
Reference in New Issue
Block a user