1
0

Added Git

This commit is contained in:
2025-10-10 16:26:32 +02:00
parent 29be17d57d
commit c8385b97c7
5 changed files with 29 additions and 1 deletions

View File

@@ -1,4 +1,13 @@
{{ $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell?" true }}
{{- $email := promptStringOnce . "email" "What's your email?" }}
{{- $git_name := promptStringOnce . "git_name" "What's your Git name?" }}
{{- $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell?" true }}
{{- $git := promptBoolOnce . "features.git" "Do you want to install Git?" true }}
[data]
email = {{ $email | quote }}
git_name = {{ $git_name | quote }}
[data.features]
shell = {{ $shell }}
git = {{ $git }}

View File

@@ -1,3 +1,6 @@
{{- if not .features.shell }}
.config/fish
{{- end }}
{{- if not .features.git }}
.config/git
{{- end }}

View File

@@ -0,0 +1,9 @@
[user]
email = {{ .email }}
name = {{ .git_name }}
[init]
defaultBranch = main
[merge]
ff = true

View File

@@ -25,3 +25,5 @@
roles:
- role: shell
when: features.shell == true
- role: git
when: features.git == true

View File

@@ -0,0 +1,5 @@
- name: Install Git on Arch
become: true
ansible.builtin.pacman:
name: git
when: chezmoi.osRelease.id == "arch"