mirror of
				https://github.com/gaschz/dotfiles.git
				synced 2025-11-03 21:18:57 +01:00 
			
		
		
		
	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>
		
			
				
	
	
		
			79 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			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:git", default=qusal_dot) -%}
 | 
						|
 | 
						|
{%- import "dom0/gui-user.jinja" as gui_user -%}
 | 
						|
 | 
						|
"{{ slsdotpath }}-copy-git-home":
 | 
						|
  file.recurse:
 | 
						|
    - name: {{ gui_user.gui_user_home }}
 | 
						|
    - source: salt://{{ slsdotpath }}/files/git
 | 
						|
    - file_mode: '0644'
 | 
						|
    - dir_mode: '0700'
 | 
						|
    - user: {{ gui_user.gui_user }}
 | 
						|
    - group: {{ gui_user.gui_user }}
 | 
						|
 | 
						|
"{{ slsdotpath }}-fix-executables-git-template-dir-home":
 | 
						|
  file.directory:
 | 
						|
    - name: {{ gui_user.gui_user_home }}/.config/git/template/hooks
 | 
						|
    - mode: '0755'
 | 
						|
    - recurse:
 | 
						|
      - mode
 | 
						|
 | 
						|
"{{ slsdotpath }}-fix-executables-git-shell-dir-home":
 | 
						|
  file.directory:
 | 
						|
    - name: {{ gui_user.gui_user_home }}/.config/git/shell
 | 
						|
    - mode: '0755'
 | 
						|
    - recurse:
 | 
						|
      - mode
 | 
						|
 | 
						|
"{{ slsdotpath }}-fix-executables-git-bin-dir-home":
 | 
						|
  file.directory:
 | 
						|
    - name: {{ gui_user.gui_user_home }}/.local/bin
 | 
						|
    - mode: '0755'
 | 
						|
    - recurse:
 | 
						|
      - mode
 | 
						|
 | 
						|
"{{ slsdotpath }}-copy-git-skel":
 | 
						|
  file.recurse:
 | 
						|
    - name: /etc/skel
 | 
						|
    - source: salt://{{ slsdotpath }}/files/git
 | 
						|
    - file_mode: '0644'
 | 
						|
    - dir_mode: '0700'
 | 
						|
    - user: root
 | 
						|
    - group: root
 | 
						|
 | 
						|
"{{ slsdotpath }}-fix-executables-git-template-dir-skel":
 | 
						|
  file.directory:
 | 
						|
    - name: /etc/skel/.config/git/template/hooks
 | 
						|
    - mode: '0755'
 | 
						|
    - recurse:
 | 
						|
      - mode
 | 
						|
 | 
						|
"{{ slsdotpath }}-fix-executables-git-shell-dir-skel":
 | 
						|
  file.directory:
 | 
						|
    - name: /etc/skel/.config/git/shell
 | 
						|
    - mode: '0755'
 | 
						|
    - recurse:
 | 
						|
      - mode
 | 
						|
 | 
						|
"{{ slsdotpath }}-fix-executables-git-bin-dir-skel":
 | 
						|
  file.directory:
 | 
						|
    - name: /etc/skel/.local/bin
 | 
						|
    - mode: '0755'
 | 
						|
    - recurse:
 | 
						|
      - mode
 | 
						|
 | 
						|
{%- else -%}
 | 
						|
 | 
						|
"{{ sls }}-was-disabled-by-pillar":
 | 
						|
  test.nop
 | 
						|
 | 
						|
{%- endif %}
 |