dotfiles/copy-gtk.sls
seven-beep 0bae3d94b2
feat: allow exclusion of dotfiles with pillars
The dotfiles provides hardened configuration as well as usability
settings, but it has downsides:

- Even though some programs allowing including extra files, not all of
  them do;
- Experienced users wants their own configuration that can conflict in
  file path;
- Adds a lot of lines to review that is not strictly necessary for Qusal
  to work.

With this change, users can set pillar values to disable specific
components or all components.

For: https://github.com/ben-grande/dotfiles/pull/1
For: https://github.com/ben-grande/qusal/issues/17
Co-authored-by: Ben Grande <ben.grande.b@gmail.com>
2025-03-03 16:25:23 +01:00

37 lines
943 B
Plaintext

{#
SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2024 seven-beep <ebn@entreparentheses.xyz>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{%- set qusal_dot = salt["pillar.get"]("qusal:dotfiles:all", default=True) -%}
{%- if salt["pillar.get"]("qusal:dotfiles:gtk", default=qusal_dot) -%}
{%- import "dom0/gui-user.jinja" as gui_user -%}
"{{ slsdotpath }}-copy-gtk-home":
file.recurse:
- name: {{ gui_user.gui_user_home }}/
- source: salt://{{ slsdotpath }}/files/gtk/
- file_mode: '0644'
- dir_mode: '0700'
- user: {{ gui_user.gui_user }}
- group: {{ gui_user.gui_user }}
"{{ slsdotpath }}-copy-gtk-skel":
file.recurse:
- name: /etc/skel
- source: salt://{{ slsdotpath }}/files/gtk/
- file_mode: '0644'
- dir_mode: '0700'
- user: root
- group: root
{%- else -%}
"{{ sls }}-was-disabled-by-pillar":
test.nop
{%- endif %}