Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default identity #109

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If you are forking this repository, don't forget to change the following places:
- [`scripts/install_dotfiles.sh`](./scripts/install_dotfiles.sh)
- Replace all occurrences of `felipecrs` with `<your-username>`
- [`home/.chezmoi.yaml.tmpl`](./home/.chezmoi.yaml.tmpl)
- Change the name and email to yours.
- Optional: add your name and email.

Where `<your-username>` is your GitHub username.

Expand Down
8 changes: 3 additions & 5 deletions home/.chezmoi.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- $name := "Felipe Santos" -}}
{{- $email := "felipecassiors@gmail.com" -}}

{{- $chezmoiForce := or (has "--force" .chezmoi.args) (has "--force=true" .chezmoi.args) -}}
{{- $interactive := and stdinIsATTY (not $chezmoiForce) -}}

Expand All @@ -10,8 +7,7 @@
{{- $gnome := lookPath "gnome-shell" | not | not -}}
{{- $headless := or (env "SSH_CLIENT" | not | not) (not (or (env "DISPLAY") (env "WAYLAND_DISPLAY"))) -}}

{{- $minimum := or $devcontainer (not $ubuntu) -}}

{{- $name := "" -}}
{{- if hasKey . "name" -}}
{{- $name = .name -}}
{{- end -}}
Expand All @@ -37,6 +33,7 @@
{{- end -}}
{{- end -}}

{{- $email := "" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- end -}}
Expand All @@ -63,6 +60,7 @@
{{- end -}}
{{- end -}}

{{- $minimum := or $devcontainer (not $ubuntu) -}}
{{- if hasKey . "is_devcontainer" -}}
{{- $minimum = .is_devcontainer -}}
{{- end -}}
Expand Down
12 changes: 9 additions & 3 deletions home/dot_gitconfig.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{{ if or .name .email -}}
[user]
name = {{ .name }}
email = {{ .email }}

{{- with .name }}
name = {{ . }}
{{- end }}
{{- with .email }}
email = {{ . }}
{{- end }}

{{ end -}}
[core]
editor = {{ .editor }}

Expand Down