Skip to content
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/automated_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
push:
paths:
- ".github/workflows/automated_tests.yml"
- ".github/workflows/automated_test.yaml"
- ".github/actions/**"
- "chezmoi/**"
branches:
Expand All @@ -17,7 +17,7 @@ on:
- reopened
- synchronize
paths:
- ".github/workflows/automated_tests.yml"
- ".github/workflows/automated_test.yaml"
- ".github/actions/**"
- "chezmoi/**"

Expand Down Expand Up @@ -89,7 +89,9 @@ jobs:
# ----------------------------------------------
- name: Run chezmoi apply
run: |
./bin/chezmoi apply
if [ -d /home/runner ]; then homedir="/home/runner"; else homedir="/Users/runner"; fi

./bin/chezmoi --config ${homedir}/.config/chezmoi/chezmoi.toml apply

# ----------------------------------------------
# UBUNTU: Confirm dotfiles are installed
Expand Down
98 changes: 82 additions & 16 deletions chezmoi/.chezmoi.toml.tmpl
Original file line number Diff line number Diff line change
@@ -1,16 +1,82 @@
{{- $use_secrets := promptBoolOnce . "use_secrets" "Use secrets from 1Password? (true/false)" -}}
{{- $git_email := promptChoiceOnce . "git_email" "Choose your git email" (list "cnytechcode@gmail.com" "seraphyne31@gmail.com") -}}
{{- $git_user := promptChoiceOnce . "git_user" "Choose your git user" (list "chianyungcode" "seraphynee" "custom") -}}
{{- if eq $git_user "custom" -}}
{{- $git_user = promptStringOnce . "git_user_custom" "What's your git user" -}}
{{- $use_secrets := false -}}
{{- if hasKey . "use_secrets" -}}
{{- $use_secrets = .use_secrets -}}
{{- else -}}
{{- $use_secrets = promptBoolOnce . "use_secrets" "Use secrets from 1Password? (true/false)" -}}
{{- end -}}
{{- $github_user := promptChoiceOnce . "github_user" "Choose your github user" (list "chianyungcode" "seraphynee" "custom") -}}
{{- if eq $github_user "custom" -}}
{{- $github_user = promptStringOnce . "github_user_custom" "What's your github user" -}}

{{- $git_email := "" -}}
{{- if hasKey . "git_email" -}}
{{- $git_email = .git_email -}}
{{- else -}}
{{- $git_email = promptChoiceOnce . "git_email" "Choose your git email" (list "cnytechcode@gmail.com" "seraphyne31@gmail.com") -}}
{{- end -}}

{{- $git_user := "" -}}
{{- if hasKey . "git_user" -}}
{{- $git_user = .git_user -}}
{{- else -}}
{{- $git_user = promptChoiceOnce . "git_user" "Choose your git user" (list "chianyungcode" "seraphynee" "custom") -}}
{{- if eq $git_user "custom" -}}
{{- $git_user = promptStringOnce . "git_user_custom" "What's your git user" -}}
{{- end -}}
{{- end -}}

{{- $github_user := "" -}}
{{- if hasKey . "github_user" -}}
{{- $github_user = .github_user -}}
{{- else -}}
{{- $github_user = promptChoiceOnce . "github_user" "Choose your github user" (list "chianyungcode" "seraphynee" "custom") -}}
{{- if eq $github_user "custom" -}}
{{- $github_user = promptStringOnce . "github_user_custom" "What's your github user" -}}
{{- end -}}
{{- end -}}

{{- $personal_computer := false -}}
{{- if hasKey . "personal_computer" -}}
{{- $personal_computer = .personal_computer -}}
{{- else -}}
{{- $personal_computer = promptBoolOnce . "personal_computer" "Is this a personal computer for daily driving? (true/false)" -}}
{{- end -}}

{{- $dev_computer := false -}}
{{- if hasKey . "dev_computer" -}}
{{- $dev_computer = .dev_computer -}}
{{- else -}}
{{- $dev_computer = promptBoolOnce . "dev_computer" "Do you do development on this computer? (true/false)" -}}
{{- end -}}

{{- $homelab_member := false -}}
{{- if hasKey . "homelab_member" -}}
{{- $homelab_member = .homelab_member -}}
{{- else -}}
{{- $homelab_member = promptBoolOnce . "homelab_member" "Is this computer part of your homelab? (true/false)" -}}
{{- end -}}

{{- $is_ci_workflow := false -}}
{{- if hasKey . "is_ci_workflow" -}}
{{- $is_ci_workflow = .is_ci_workflow -}}
{{- end -}}

{{- $xdg_cache_dir := printf "%s/.cache" .chezmoi.homeDir -}}
{{- if hasKey . "xdgCacheDir" -}}
{{- $xdg_cache_dir = .xdgCacheDir -}}
{{- end -}}

{{- $xdg_config_dir := printf "%s/.config" .chezmoi.homeDir -}}
{{- if hasKey . "xdgConfigDir" -}}
{{- $xdg_config_dir = .xdgConfigDir -}}
{{- end -}}

{{- $xdg_data_dir := printf "%s/.local/share" .chezmoi.homeDir -}}
{{- if hasKey . "xdgDataDir" -}}
{{- $xdg_data_dir = .xdgDataDir -}}
{{- end -}}

{{- $xdg_state_dir := printf "%s/.local/state" .chezmoi.homeDir -}}
{{- if hasKey . "xdgStateDir" -}}
{{- $xdg_state_dir = .xdgStateDir -}}
{{- end -}}
{{- $personal_computer := promptBoolOnce . "personal_computer" "Is this a personal computer for daily driving? (true/false)" -}}
{{- $dev_computer := promptBoolOnce . "dev_computer" "Do you do development on this computer? (true/false)" -}}
{{- $homelab_member := promptBoolOnce . "homelab_member" "Is this computer part of your homelab? (true/false)" -}}

# NOTE
# 'use_secrets' ensures whether you are using 1Password; if so, all 1Password functions like 'onePasswordRead' can be used because the "op" CLI is installed
Expand All @@ -27,13 +93,13 @@ encryption = "age"
github_user = {{ $github_user | quote }}
dev_computer = {{ $dev_computer }}
homelab_member = {{ $homelab_member }}
is_ci_workflow = false
is_ci_workflow = {{ $is_ci_workflow }}
personal_computer = {{ $personal_computer }}
use_secrets = {{ $use_secrets }}
xdgCacheDir = "{{ .chezmoi.homeDir }}/.cache"
xdgConfigDir = "{{ .chezmoi.homeDir }}/.config"
xdgDataDir = "{{ .chezmoi.homeDir }}/.local/share"
xdgStateDir = "{{ .chezmoi.homeDir }}/.local/state"
xdgCacheDir = {{ $xdg_cache_dir | quote }}
xdgConfigDir = {{ $xdg_config_dir | quote }}
xdgDataDir = {{ $xdg_data_dir | quote }}
xdgStateDir = {{ $xdg_state_dir | quote }}

[diff]
command = "difft"
Expand Down
15 changes: 14 additions & 1 deletion chezmoi/.chezmoiignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,24 @@ Library
.config/borders
{{ end }}


# Ignore .config/hypr unless the OS is Linux and the distro is Arch.
# This means:
# If the OS is NOT Linux OR the distro is NOT Arch, then ignore .config/hypr.
{{ if or (ne .chezmoi.os "linux") (ne .chezmoi.osRelease.id "arch") }}
.config/hypr
.config/systemd
{{ end }}

{{ if .is_ci_workflow }}
# Skip encrypted source files in CI.
# .chezmoiignore matches target paths, so source attributes like `encrypted_`
# are stripped before matching.
.agents
.codex
.config/espanso/match/ai.yaml
.config/espanso/match/email.yaml
.config/espanso/match/macos.yaml
.config/espanso/match/ticktick.yaml
.config/fish/env.d/030-secrets-age.fish
.config/zsh/env.d/030-secrets-age.sh
{{ end }}
2 changes: 1 addition & 1 deletion chezmoi/private_dot_opencommit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OCO_API_KEY={{ onepasswordRead .secrets.ai_tools.oco_apikey }}
OCO_API_URL={{ onepasswordRead .secrets.ai_tools.oco_apiurl }}
{{- end }}
OCO_AI_PROVIDER=openrouter
OCO_MODEL=minimax/minimax-m2.5
OCO_MODEL=moonshotai/kimi-k2.5
OCO_TOKENS_MAX_OUTPUT=500
OCO_DESCRIPTION=false
OCO_EMOJI=false
Expand Down
Loading