feat: add Element formula

This commit is contained in:
Ben Grande 2024-05-28 09:57:55 +02:00
parent efcf8c7723
commit 26a35b838f
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56
17 changed files with 301 additions and 0 deletions

View File

@ -69,6 +69,10 @@ Files: salt/docker/files/repo/*
Copyright: 2017 Docker Inc. <docker@docker.com>
License: CC0-1.0
Files: salt/element/files/repo/*
Copyright: 2019 Element <packages@riot.im>
License: CC0-1.0
Files: salt/kicksecure-minimal/files/repo/*
Copyright: 2014 Patrick Schleizer <adrelanos@kicksecure.com>
License: CC0-1.0

View File

@ -54,6 +54,7 @@ matter in some circumstances, in those cases, it is noted in this page.
- Instant messaging and E-Mail:
- [mail](../salt/mail/README.md)
- [signal](../salt/signal/README.md)
- [element](../salt/element/README.md)
- Electronic cash:
- [sys-bitcoin](../salt/sys-bitcoin/README.md)
@ -70,6 +71,7 @@ matter in some circumstances, in those cases, it is noted in this page.
- Multimedia:
- [reader](../salt/reader/README.md)
- [media](../salt/media/README.md)
- [sys-print](../salt/sys-print/README.md)
- File sharing:
- [sys-ssh](../salt/sys-ssh/README.md)

37
salt/element/README.md Normal file
View File

@ -0,0 +1,37 @@
# element
Element Matrix client installation in Qubes OS.
## Table of Contents
* [Description](#description)
* [Installation](#installation)
* [Usage](#usage)
## Description
Install Element and use it on the "element" app qube to connect to your
Matrix account.
## Installation
- Top:
```sh
sudo qubesctl top.enable element
sudo qubesctl --targets=tpl-element state.apply
sudo qubesctl top.disable element
sudo qubesctl state.apply element.appmenus
```
- State:
<!-- pkg:begin:post-install -->
```sh
sudo qubesctl state.apply element.create
sudo qubesctl --skip-dom0 --targets=tpl-element state.apply element.install
sudo qubesctl state.apply element.appmenus
```
<!-- pkg:end:post-install -->
## Usage
You can connect to your Matrix account via the Element client.

View File

@ -0,0 +1,8 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% from 'utils/macros/sync-appmenus.sls' import sync_appmenus -%}
{{ sync_appmenus('tpl-' ~ sls_path) }}

10
salt/element/appmenus.top Normal file
View File

@ -0,0 +1,10 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'dom0':
- match: nodegroup
- element.appmenus

8
salt/element/clone.sls Normal file
View File

@ -0,0 +1,8 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% from 'utils/macros/clone-template.sls' import clone_template -%}
{{ clone_template('debian-minimal', sls_path) }}

10
salt/element/clone.top Normal file
View File

@ -0,0 +1,10 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'dom0':
- match: nodegroup
- element.clone

77
salt/element/create.sls Normal file
View File

@ -0,0 +1,77 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{%- from "qvm/template.jinja" import load -%}
include:
- .clone
{% load_yaml as defaults -%}
name: tpl-{{ slsdotpath }}
force: True
require:
- sls: {{ slsdotpath }}.clone
prefs:
- audiovm: ""
features:
- set:
- default-menu-items: "element-desktop.desktop qubes-run-terminal.desktop qubes-start.desktop"
- menu-items: "element-desktop.desktop qubes-run-terminal.desktop qubes-start.desktop"
{%- endload %}
{{ load(defaults) }}
{% load_yaml as defaults -%}
name: {{ slsdotpath }}
force: True
require:
- sls: {{ slsdotpath }}.clone
present:
- template: tpl-{{ slsdotpath }}
- label: yellow
prefs:
- template: tpl-{{ slsdotpath }}
- label: yellow
- audiovm: "*default*"
- vcpus: 1
- memory: 300
- maxmem: 800
- autostart: False
features:
- disable:
- service.cups
- service.cups-browsed
- set:
- menu-items: "element-desktop.desktop qubes-run-terminal.desktop qubes-start.desktop"
{%- endload %}
{{ load(defaults) }}
{% load_yaml as defaults -%}
name: dvm-{{ slsdotpath }}
force: True
require:
- sls: {{ slsdotpath }}.clone
present:
- template: tpl-{{ slsdotpath }}
- label: yellow
prefs:
- template: tpl-{{ slsdotpath }}
- label: yellow
- audiovm: "*default*"
- memory: 300
- maxmem: 800
- vcpus: 1
- template_for_dispvms: True
- include_in_backups: False
features:
- enable:
- appmenus-dispvm
- disable:
- service.cups
- service.cups-browsed
- set:
- menu-items: "element-desktop.desktop qubes-run-terminal.desktop qubes-start.desktop"
{%- endload %}
{{ load(defaults) }}

10
salt/element/create.top Normal file
View File

@ -0,0 +1,10 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'dom0':
- match: nodegroup
- element.create

View File

@ -0,0 +1,58 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFy1FpcBEADemFRfa16qbsgvnEq5TPhFOssXfSLG4eGBrU0O6adDwv6QyE53
fivsepaZ21xLXP8KdfJBe40XmsYDLk6I+1cQIoKLCDhN/omaCivJ0QwsHKFqdhsD
0mmGpRzN1nNXOV856tcWsj25T4V2ttPumvCV/ArITta0X2GPbF2oYKbKjE93uZWR
xogqHrD7QVzjlDvU6+gQ/TzIA/k0cG/LlOqhHTrR/VMvSzE9LDn2YoWaC2Hk2NZE
Uby788vombTgPhTrCUmQwDsaXYUfILLhaiAdCqNc3aMcNjc3VX1YjJG0pArx9V2N
RPMR2UZQzSLgthEz/om9k7x9A9RG85Jo2AAmjrpIl4NRawpKP+uXtIdr4huCzWT4
r8e1DiMORKRvRPzua/kf+i8vjKWy16KRD5N6rNOTjfoSQxkQTgh9fvLgJUAJ+UnL
gLKXaijyyIisQ6O2zaI5jJMuSzBG129xpdCeNB0Vmfuy8fBGttTg+OoP1mhnQtDA
mh7k5EefFKDoKKgt2m+C6nlLr7pG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8Z4xBaOGjbWYTMxKw/M9sRmHIvXVcQmWdPhCOIP1XQndJoAJENewtmlB0BU4tH4Q
AJBY7zgltSpJWQicA8n52xZer1lybUbDCKmyhoORlINZkxfZiPZMpVt6oQM24ELn
8oVLDIEoHd50FTLyietipF0vHSqpCPY8VEWjgjPeyL7qIEQZC0rk5leMGS4O7PFw
1GWn1Kiiq5/mf10tpdBaPoh8fm5WWmR/8SgIoS5apEemf82k3gahz6bhk9Tp4mIm
vlEye/iUeAnKfTchlFuW2oQvSAE4Q7FQSFUm+SSfDlpNNmuvw4eeHrXgO6rVqyut
TmNqjAZYyd944/JPSgOCadTODSQ+s2SGuj9JtJbHNWkL51qlUiDi50bJTTdeBc/o
LWmwp90EyhmgzNJfUTloi1LnKv0obJRTBCHSbSTPNQPW1UlTRCYulOjD87YhpX5z
WI84HkBnh9fIGrxf825YOY3jYmHOC2NDJv3vDL38AGpCfl/LUo0CM3jI4geuL9Rj
7LQ65TbuDiZJ8kIEQD4f2a3wKC8IHTF1hoN+NzW6r1SgQC165jhuyj0qkHzhS0l6
0Q7FBZgl7stVGKFrTfvBM6nGAPYmEc9Tx//8WhxBeRk3E541JZAsz9Tl3Zf0hKM5
kZHJy2TdUcpa/jm/Rs6zo2dPi1RJpX73wl4HV5UKY6sq+CbGg0Yr6f2R21usZv2Q
t8xqsC/HX8ZMcLpv2hDnRtDoiCQo5DX+aIgUSE76SyKp
=iXCs
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -0,0 +1,2 @@
deb [signed-by=/usr/share/keyrings/element.asc] https://packages.element.io/debian/ default main
# vim:ft=debsources

View File

@ -0,0 +1,6 @@
Types: deb
URIs: https://packages.element.io/debian/
Suites: default
Components: main
Signed-by: /usr/share/keyrings/element.asc
# vim:ft=debsources

12
salt/element/init.top Normal file
View File

@ -0,0 +1,12 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'dom0':
- match: nodegroup
- element.create
'tpl-element':
- element.install

View 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
#}
{% if grains['nodename'] != 'dom0' -%}
{% from 'utils/macros/install-repo.sls' import install_repo -%}
{{ install_repo(sls_path, 'element') }}
{% endif -%}

View File

@ -0,0 +1,9 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'tpl-element':
- element.install-repo

27
salt/element/install.sls Normal file
View File

@ -0,0 +1,27 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{% if grains['nodename'] != 'dom0' -%}
include:
- .install-repo
- utils.tools.common.update
- sys-audio.install-client
"{{ slsdotpath }}-installed":
pkg.installed:
- require:
- sls: {{ slsdotpath }}.install-repo
- sls: utils.tools.common.update
- install_recommends: False
- skip_suggestions: True
- pkgs:
- qubes-core-agent-networking
- ca-certificates
- element-desktop
- dunst
{% endif -%}

9
salt/element/install.top Normal file
View File

@ -0,0 +1,9 @@
{#
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
base:
'tpl-element':
- element.install