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
|
|
|
|
|
2024-06-06 14:38:27 -04:00
|
|
|
"{{ slsdotpath }}-unmask-apt-cacher-ng":
|
|
|
|
service.unmasked:
|
2023-11-21 18:55:16 -05:00
|
|
|
- name: apt-cacher-ng
|
|
|
|
- runtime: False
|
|
|
|
|
2024-06-06 14:38:27 -04:00
|
|
|
"{{ slsdotpath }}-enable-apt-cacher-ng":
|
|
|
|
service.enabled:
|
2024-05-29 07:56:46 -04:00
|
|
|
- name: apt-cacher-ng
|
2023-11-13 09:33:28 -05:00
|
|
|
|
2023-11-21 18:55:16 -05:00
|
|
|
"{{ slsdotpath }}-create-qubes-cacher-config-dir":
|
|
|
|
file.directory:
|
2024-06-25 16:16:26 -04:00
|
|
|
- name: /etc/qusal-apt-cacher-ng
|
2023-11-21 18:55:16 -05:00
|
|
|
- mode: '0755'
|
|
|
|
|
|
|
|
"{{ slsdotpath }}-copy-package-config-to-qubes-cacher-config":
|
|
|
|
cmd.run:
|
2024-06-25 16:16:26 -04:00
|
|
|
- name: cp -rp /etc/apt-cacher-ng/* /etc/qusal-apt-cacher-ng
|
2023-11-21 18:55:16 -05:00
|
|
|
|
|
|
|
"{{ slsdotpath }}-systemd-service":
|
|
|
|
file.managed:
|
2024-05-29 07:56:46 -04:00
|
|
|
- name: /usr/lib/systemd/system/apt-cacher-ng.service.d/50_qusal.conf
|
|
|
|
- source: salt://{{ slsdotpath }}/files/server/systemd/apt-cacher-ng.service.d/50_qusal.conf
|
2023-11-21 18:55:16 -05:00
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: '0644'
|
2024-05-29 07:56:46 -04:00
|
|
|
- makedirs: True
|
2023-11-21 18:55:16 -05:00
|
|
|
|
2024-06-06 14:38:27 -04:00
|
|
|
"{{ slsdotpath }}-update-deb_mirrors.gz":
|
2023-11-13 09:33:28 -05:00
|
|
|
cmd.run:
|
2024-06-25 16:16:26 -04:00
|
|
|
- name: cp /usr/lib/apt-cacher-ng/deb_mirrors.gz /etc/qusal-apt-cacher-ng/deb_mirrors.gz
|
2023-11-13 09:33:28 -05:00
|
|
|
- runas: root
|
|
|
|
|
2024-06-06 14:38:27 -04:00
|
|
|
"{{ slsdotpath }}-update-conf":
|
|
|
|
file.recurse:
|
2024-06-25 16:16:26 -04:00
|
|
|
- name: /etc/qusal-apt-cacher-ng/
|
2024-06-06 14:38:27 -04:00
|
|
|
- source: salt://{{ slsdotpath }}/files/server/conf/
|
|
|
|
- file_mode: "0644"
|
2023-11-13 09:33:28 -05:00
|
|
|
- group: root
|
|
|
|
- user: 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 }}-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 -%}
|