2023-11-13 09:33:28 -05:00
|
|
|
{#
|
2024-03-18 11:29:01 -04:00
|
|
|
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
#}
|
|
|
|
|
|
|
|
{% if grains['nodename'] != 'dom0' -%}
|
|
|
|
|
2024-03-18 11:29:01 -04:00
|
|
|
include:
|
|
|
|
- utils.tools.common.update
|
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
"{{ slsdotpath }}-allow-testing-repository":
|
|
|
|
file.uncomment:
|
|
|
|
- name: /etc/apt/sources.list.d/qubes-r4.list
|
|
|
|
- regex: ^deb\s.*qubes-os.org.*-testing
|
2023-12-19 15:12:07 -05:00
|
|
|
- backup: False
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
"{{ slsdotpath }}-installed":
|
|
|
|
pkg.installed:
|
2024-03-18 11:29:01 -04:00
|
|
|
- require:
|
|
|
|
- sls: utils.tools.common.update
|
2023-11-13 09:33:28 -05:00
|
|
|
- install_recommends: False
|
|
|
|
- skip_suggestions: True
|
|
|
|
- pkgs:
|
|
|
|
- qubes-core-agent-networking
|
|
|
|
- qubes-app-shutdown-idle
|
|
|
|
- ca-certificates
|
|
|
|
- anacron
|
|
|
|
- apt-cacher-ng
|
|
|
|
|
2023-11-21 18:55:16 -05:00
|
|
|
"{{ slsdotpath }}-mask-apt-cacher-ng":
|
|
|
|
service.masked:
|
|
|
|
- name: apt-cacher-ng
|
|
|
|
- runtime: False
|
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
"{{ slsdotpath }}-disable-apt-cacher-ng":
|
|
|
|
cmd.run:
|
|
|
|
- name: systemctl disable apt-cacher-ng
|
|
|
|
|
2023-11-21 18:55:16 -05:00
|
|
|
"{{ slsdotpath }}-create-qubes-cacher-config-dir":
|
|
|
|
file.directory:
|
|
|
|
- name: /etc/qubes-apt-cacher-ng
|
|
|
|
- mode: '0755'
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-copy-package-config-to-qubes-cacher-config":
|
|
|
|
cmd.run:
|
|
|
|
- name: cp -rp /etc/apt-cacher-ng/* /etc/qubes-apt-cacher-ng
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-systemd-service":
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/lib/systemd/system/qubes-apt-cacher-ng.service
|
|
|
|
- source: salt://{{ slsdotpath }}/files/server/systemd/qubes-apt-cacher-ng.service
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: '0644'
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-mask-qubes-apt-cacher-ng":
|
2023-11-13 09:33:28 -05:00
|
|
|
service.masked:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: qubes-apt-cacher-ng
|
2023-11-13 09:33:28 -05:00
|
|
|
- runtime: False
|
|
|
|
|
2023-11-21 18:55:16 -05:00
|
|
|
"{{ slsdotpath }}-disable-qubes-apt-cacher-ng":
|
|
|
|
cmd.run:
|
|
|
|
- name: systemctl disable qubes-apt-cacher-ng
|
|
|
|
|
2023-11-13 09:33:28 -05:00
|
|
|
"{{ slsdotpath }}-install-backends_debian":
|
|
|
|
file.prepend:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: /etc/qubes-apt-cacher-ng/backends_debian
|
2023-11-13 09:33:28 -05:00
|
|
|
- text: https://deb.debian.org/debian
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-update-debian-mirrors":
|
|
|
|
cmd.run:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: cp /usr/lib/apt-cacher-ng/deb_mirrors.gz /etc/qubes-apt-cacher-ng/deb_mirrors.gz
|
2023-11-13 09:33:28 -05:00
|
|
|
- runas: root
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-update-fedora-mirrors":
|
|
|
|
file.managed:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: /etc/qubes-apt-cacher-ng/fedora_mirrors
|
2023-11-13 09:33:28 -05:00
|
|
|
- source: salt://{{ slsdotpath }}/files/server/mirrors/fedora_mirrors
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-update-arch-mirrors":
|
|
|
|
file.managed:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: /etc/qubes-apt-cacher-ng/archlx_mirrors
|
2023-11-13 09:33:28 -05:00
|
|
|
- source: salt://{{ slsdotpath }}/files/server/mirrors/archlx_mirrors
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
|
2023-12-19 16:50:59 -05:00
|
|
|
"{{ slsdotpath }}-lib-qubes-bind-dirs":
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/lib/qubes-bind-dirs.d/50-sys-cacher.conf
|
|
|
|
- source: salt://{{ slsdotpath }}/files/server/lib-qubes-bind-dirs.d/50-sys-cacher.conf
|
|
|
|
- mode: '0644'
|
|
|
|
- user: root
|
|
|
|
- group: root
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
"{{ slsdotpath }}-acng.conf":
|
|
|
|
file.managed:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: /etc/qubes-apt-cacher-ng/acng.conf
|
2023-11-13 09:33:28 -05:00
|
|
|
- source: salt://{{ slsdotpath }}/files/server/conf/acng.conf
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-desktop-application-browser":
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/share/applications/cacher-browser.desktop
|
|
|
|
- source: salt://{{ slsdotpath }}/files/server/cacher-browser.desktop
|
|
|
|
- mode: '0644'
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-desktop-application-open-general":
|
|
|
|
file.managed:
|
|
|
|
- name: /usr/share/applications/cacher-browser-general.desktop
|
|
|
|
- source: salt://{{ slsdotpath }}/files/server/cacher-browser-general.desktop
|
|
|
|
- mode: '0644'
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-etc-mimeapps.list":
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/xdg/mimeapps.list
|
|
|
|
- source: salt://{{ slsdotpath }}/files/server/mimeapps.list
|
|
|
|
- mode: '0644'
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
{% endif -%}
|