Proton - first build

This commit is contained in:
unman 2024-02-23 12:55:07 +00:00
parent 3017e07378
commit 906774daee
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
7 changed files with 107 additions and 0 deletions

15
proton/clone.sls Normal file
View File

@ -0,0 +1,15 @@
proton_precursor:
qvm.template_installed:
- name: debian-12-minimal
proton_clone:
qvm.clone:
- name: template-proton
- source: debian-12-minimal
proton_menu:
qvm.features:
- name: template-proton
- set:
- menu-items: "protonvpn.desktop firefox-esr.desktop debian-xterm.desktop"
- default-menu-items: "protonvpn.desktop firefox-esr.desktop debian-xterm.desktop"

4
proton/clone.top Normal file
View File

@ -0,0 +1,4 @@
base:
dom0:
- match: nodegroup
- proton.clone

28
proton/create.sls Normal file
View File

@ -0,0 +1,28 @@
include:
- proton.clone
qvm-present-id:
qvm.present:
- name: proton
- class: AppVM
- template: template-proton
- label: green
qvm-prefs-id:
qvm.prefs:
- name: proton
- memory: 400
- maxmem: 800
- vcpus: 2
qvm-features-id:
qvm.features:
- name: proton
- disable:
- service.cups
- service.cups-browsed
- service.tinyproxy
- enable:
- service.network-manager
- set:
- menu-items: "protonvpn.desktop firefox-esr.desktop debian-xterm.desktop"

4
proton/create.top Normal file
View File

@ -0,0 +1,4 @@
base:
dom0:
- match: nodegroup
- proton.create

53
proton/install.sls Normal file
View File

@ -0,0 +1,53 @@
include:
- proton.clone
/tmp/protonvpn-stable-release_1.0.3-2_all.deb:
file.managed:
- source:
- salt://proton/protonvpn-stable-release_1.0.3-2_all.deb
'dpkg -i /tmp/protonvpn-stable-release_1.0.3-2_all.deb':
cmd.run
{% if salt['pillar.get']('update_proxy:caching') %}
{% set proxy = 'cacher' %}
{% endif %}
{% if grains['nodename'] != 'dom0' %}
{% if grains['os_family']|lower == 'debian' %}
{% if grains['nodename']|lower != 'host' %}
{% if proxy == 'cacher' %}
{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %}
{{ repo }}_baseurl:
file.replace:
- name: {{ repo }}
- pattern: 'https://'
- repl: 'http://HTTPS///'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endfor %}
/etc/apt/sources.list:
file.replace:
- name: /etc/apt/sources.list
- pattern: 'https:'
- repl: 'http://HTTPS/'
- flags: [ 'IGNORECASE', 'MULTILINE' ]
- backup: False
{% endif %}
{% endif %}
{% endif %}
{% endif %}
proton_install:
pkg.installed:
- skip_suggestions: True
- install_recommends: False
- pkgs:
- qubes-core-agent-network-manager
- qubes-core-agent-networking
- firefox-esr
- network-manager
- protonvpn-gui

3
proton/install.top Normal file
View File

@ -0,0 +1,3 @@
base:
template-proton:
- proton.install

Binary file not shown.