Skip to content

Commit

Permalink
refactor(chezmoi/data): small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
scottames committed Nov 16, 2024
1 parent 02e5b94 commit 4b8ff66
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions home/.chezmoi.toml.tmpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{{- $name := "Scott Ames" -}}
{{- $dotsStr := "dots" -}}
{{- $email := "[email protected]" -}}
{{- $hourDark := 24 -}}
{{- $hourLight := 24 -}}
{{- $githubUser := "scottames" -}}
{{- $fontMonospace := "FiraCode Nerd Font Mono" -}}
{{- $useGitWorktrees := true -}}

{{- /* TODO: source entire file into env and reference natively here? */ -}}

{{- $chassis := "" -}}
{{- $desktopSession := env "DESKTOP_SESSION" -}}
{{- $gpu := "" -}}
{{- $hostname := "" -}}
{{- $hourDark := 24 -}}
{{- $hourLight := 24 -}}
{{- $isContainer := false -}}
{{- $isDistroBox := false -}}
{{- $isUblue := false -}}
Expand All @@ -21,11 +22,10 @@
{{- $osVariant := "" -}}
{{- $osVersion := "" -}}
{{- $ublueImageInfo := "" -}}
{{- $useGitWorktrees := true -}}
{{- $wallpaper := "" -}}

{{- if $useGitWorktrees -}}
{{- $dotsStr = printf "%s/main" $dotsStr -}}
{{- $dotsStr = joinPath $dotsStr "main" -}}
{{- end -}}

{{- $gravatarID := trim (
Expand Down Expand Up @@ -99,10 +99,11 @@ output "sh" "-c" "printf '[email protected]' | md5sum - | cut -d' ' -f1"
{{- $aquaRoot := env "AQUA_ROOT_DIR" -}}
{{- $aquaInstalled := ne $aquaRoot "" }}

{{- $srcDir := printf "%s/src" .chezmoi.homeDir -}}
{{- $srcGitHubDir := printf "%s/github.com/%s" $srcDir $githubUser -}}
{{- $dots := printf "%s/%s" $srcGitHubDir $dotsStr -}}
{{- $chezmoiSourceDir := printf "%s/home" $dots -}}
{{- $srcDir := joinPath .chezmoi.homeDir "src" -}}
{{- $srcGitHubDir := joinPath $srcDir "github.com" $githubUser -}}
{{- $dots := joinPath $srcGitHubDir $dotsStr -}}
{{- $chezmoiSourceDir := joinPath $dots "home" -}}

{{- if lstat (joinPath .chezmoi.homeDir ".wallpaper") -}}
{{- $wallpaper = trim (include (printf "%s/.wallpaper" .chezmoi.homeDir)) -}}
{{- else -}}
Expand Down

0 comments on commit 4b8ff66

Please sign in to comment.