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

fix(wsl/home/.config/mise/config.toml): manage env vars using mise #1071

Merged
merged 14 commits into from
Dec 19, 2024
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: 0 additions & 8 deletions wsl/home/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,6 @@ eval "${gh_completion}"
fzf_integration="$(fzf --bash)"
eval "${fzf_integration}"

# gpg
GPG_TTY=$(tty)
export GPG_TTY

# set GITHUB_TOKEN to avoid rate limit while using mise
GITHUB_TOKEN=$(gh auth token)
export GITHUB_TOKEN

# aliases
alias beep="printf '\a'"
alias l="eza --all --long --git"
Expand Down
9 changes: 9 additions & 0 deletions wsl/home/.config/mise/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ min_version = "2024.12.14"
[env]
# disable bat paging
BAT_PAGING = "never"
# gpg requires tty
# GitHub Actions doesn't have tty
# ref: https://github.com/actions/runner/issues/241
GPG_TTY = "{% if env.CI is undefined %}{{ exec(command='tty', cache_key='tty', cache_duration='1 week') }}{% endif %}"

# set GITHUB_TOKEN to avoid rate limit while using mise
[env.GITHUB_TOKEN]
value = "{% if env.CI is undefined %}{{ exec(command='gh auth token', cache_key='github_token', cache_duration='1 day') }}{% endif %}"
tools = true

[tools]
# language tools
Expand Down
Loading