Rearanging and merging aliases.env
This commit is contained in:
parent
61b5f3f441
commit
fa83394898
11 changed files with 91 additions and 165 deletions
226
_src.posix/.chezmoiexternal.yaml.tmpl
Normal file
226
_src.posix/.chezmoiexternal.yaml.tmpl
Normal file
|
@ -0,0 +1,226 @@
|
|||
# https://www.chezmoi.io/reference/special-files-and-directories/chezmoiexternal-format/
|
||||
# The file will be empty (except for this comment) unless CZ_EXTR env variable exists.
|
||||
#
|
||||
# The externals are checked based on the refreshPeriod whenever an `apply` (or `update`) operations run
|
||||
#
|
||||
# The syntax to update all externals (and nothing else):
|
||||
# ```sh
|
||||
# CZ_EXTR=1 chezmoi apply --include externals
|
||||
# ```
|
||||
#
|
||||
{{/*
|
||||
#
|
||||
# Variable Type Default Description
|
||||
# type string none External type (file, archive, archive-file, or git-repo)
|
||||
# url string none URL
|
||||
# refreshPeriod duration 0 Refresh period (Examples: one day (24h), one week (168h), or four weeks (672h))
|
||||
# executable bool false Add executable_ attribute to file
|
||||
# path string none Path to file in archive
|
||||
*/}}
|
||||
{{- if (env "CZ_EXTR") -}}
|
||||
{{/* Initialize template variables */}}
|
||||
{{- $myArch := "" -}}
|
||||
{{- $defaultRefresh := "168h" -}}
|
||||
{{- $externals := dict -}}
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
# aarch64-apple-darwin
|
||||
# x86_64-apple-darwin
|
||||
# aarch64-unknown-linux-musl
|
||||
# x86_64-unknown-linux-musl
|
||||
*/}}
|
||||
|
||||
{{ $myArch = (printf "%s-%s" .sz.os.arch_alt .sz.os.rust_rel_target )}}
|
||||
|
||||
{{- with $repo := "zellij-org/zellij" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".cache/chezmoi/tmp/zellij" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/zellij-%s.tar.gz" $repo $version $myArch)
|
||||
"path" "zellij"
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $repo := "dandavison/delta" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/delta" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/delta-%s-%s.tar.gz" $repo $version $version $myArch)
|
||||
"path" (printf "delta-%s-%s/delta" $version $myArch)
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
# darwin_amd64
|
||||
# darwin_arm64
|
||||
# linux_386
|
||||
# linux_amd64
|
||||
# linux_arm64
|
||||
# windows_386
|
||||
# windows_amd64
|
||||
# windows_arm64
|
||||
*/}}
|
||||
{{- $myArch = (printf "%s_%s" .chezmoi.os .chezmoi.arch) -}}
|
||||
|
||||
{{- with $repo := "hickford/git-credential-oauth" -}}
|
||||
{{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/git-credential-oauth" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/v%s/git-credential-oauth_%s_%s.tar.gz" $repo $version $version $myArch)
|
||||
"path" "git-credential-oauth"
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $repo := "noborus/ov" -}}
|
||||
{{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/ov" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/v%s/ov_%s_%s.zip" $repo $version $version $myArch)
|
||||
"path" "ov"
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
# linux-aarch64
|
||||
# linux-arm
|
||||
# linux-armv7
|
||||
# linux-x86_64
|
||||
# mac-x86
|
||||
# mac
|
||||
# win
|
||||
*/}}
|
||||
|
||||
{{- $myArch = .sz.os.short -}}
|
||||
{{- if eq .chezmoi.os "linux" -}}
|
||||
{{- $myArch = (printf "%s-%s" .chezmoi.os .sz.os.arch_alt) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $repo := "extrawurst/gitui" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/gitui" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/gitui-%s.tar.gz" $repo $version $myArch)
|
||||
"path" "./gitui"
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
# darwin-amd64
|
||||
# darwin-arm64
|
||||
# freebsd-amd64
|
||||
# freebsd-arm64
|
||||
# linux-amd64
|
||||
# linux-arm64
|
||||
# openbsd-amd64
|
||||
# openbsd-arm64
|
||||
# windows-amd64
|
||||
# windows-arm64
|
||||
*/}}
|
||||
{{- $myArch = (print .chezmoi.os "-" .chezmoi.arch) -}}
|
||||
|
||||
{{- with $repo := "Lifailon/lazyjournal" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/lazyjournal" (dict
|
||||
"type" "file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/lazyjournal-%s-%s" $repo $version $version $myArch)
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
# Darwin_arm64
|
||||
# Darwin_x86_64
|
||||
# Linux_arm64
|
||||
# Linux_i386
|
||||
# Linux_x86_64
|
||||
# Windows_arm64
|
||||
# Windows_i386
|
||||
# Windows_x86_64
|
||||
*/}}
|
||||
{{- $myArch = (printf "%s_%s" ( .chezmoi.os | title ) .sz.os.arch_alt) -}}
|
||||
|
||||
{{- with $repo := "theimpostor/osc" -}}
|
||||
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
|
||||
{{- $_ := set $externals ".local/bin/osc" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://github.com/%s/releases/download/%s/osc_%s.tar.gz" $repo $version $myArch)
|
||||
"path" "osc"
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
# valid arch strings:
|
||||
# darwin-amd64
|
||||
# darwin-arm64
|
||||
# linux-386
|
||||
# linux-amd64
|
||||
# linux-arm64
|
||||
*/}}
|
||||
{{- $myArch = (printf "%s-%s" .chezmoi.os .chezmoi.arch) -}}
|
||||
|
||||
{{- if and (env "TELEPORT_MAJOR") (not (eq .chezmoi.os "windows")) -}}
|
||||
{{- with $repo := "gravitational/teleport" -}}
|
||||
{{- with $version := (gitHubReleases $repo | toJson | fromJson | jq (printf "map(select(.tag_name | startswith(\"v%s\")))[0] | .tag_name" (env "TELEPORT_MAJOR")) | first ) -}}
|
||||
{{- $_ := set $externals ".local/bin/tsh" (dict
|
||||
"type" "archive-file"
|
||||
"url" (printf "https://cdn.teleport.dev/teleport-%s-%s-bin.tar.gz" $version $myArch)
|
||||
"path" "teleport/tsh"
|
||||
"executable" true
|
||||
"refreshPeriod" $defaultRefresh
|
||||
) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{- $externals | toYaml }}
|
||||
".config/sz.env/lib/ble.sh.curl":
|
||||
type: "archive"
|
||||
url: "https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz"
|
||||
refreshPeriod: "{{ $defaultRefresh }}"
|
||||
|
||||
".config/sz.env/lib/delta.themes.gitconfig":
|
||||
type: "file"
|
||||
url: "https://raw.githubusercontent.com/dandavison/delta/refs/heads/main/themes.gitconfig"
|
||||
refreshPeriod: "{{ $defaultRefresh }}"
|
||||
|
||||
".config/sz.env/lib/bash-preexec/bash-preexec.sh":
|
||||
type: "file"
|
||||
url: "https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh"
|
||||
refreshPeriod: "{{ $defaultRefresh }}"
|
||||
|
||||
{{- if eq .chezmoi.os "linux" -}}
|
||||
".local/bin/nvim.AppImage":
|
||||
type: "file"
|
||||
url: "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.appimage"
|
||||
executable: true
|
||||
refreshPeriod: "{{ $defaultRefresh }}"
|
||||
{{- end -}}
|
||||
|
||||
{{- else -}}
|
||||
# .chezmoiexternal is disabled because CZ_EXTR env is undefined
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue