dotfiles/chezmoi.roots/_src.posix/.chezmoiexternal.yaml.tmpl

377 lines
14 KiB
Cheetah
Raw Normal View History

# 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
*/}}
{{- $defaultRefresh := "168h" -}}
{{- if (env "CZ_EXTR") -}}
{{/* Initialize template variables */}}
{{- $myArch := "" -}}
{{- $archive_type := or (get (dict "linux" "tar.gz") .chezmoi.os) "zip" -}}
{{- $archive_type_short := or (get (dict "tar.gz" "tgz") $archive_type) $archive_type -}}
{{- $path_prefix := "" -}}
{{- $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 $app_name := "zellij" -}}
{{- with $repo := (printf "%s/%s" "zellij-org" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.tar.gz" $repo $version $app_name $myArch)
"path" $app_name
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "delta" -}}
{{- with $repo := (printf "%s/%s" "dandavison" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s-%s.tar.gz" $repo $version $app_name $version $myArch)
"path" (printf "%s-%s-%s/%s" $app_name $version $myArch $app_name)
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "atuin" -}}
{{- with $repo := (printf "%s/%s" "atuinsh" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.tar.gz" $repo $version $app_name $myArch)
"path" (printf "%s-%s/%s" $app_name $myArch $app_name )
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
2025-04-08 19:47:02 +00:00
2025-04-09 17:22:37 +00:00
{{- with $app_name := "lsd" -}}
{{- with $repo := (printf "%s/%s" "lsd-rs" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s-%s.tar.gz" $repo $version $app_name $version $myArch)
"path" (printf "%s-%s-%s/%s" $app_name $version $myArch $app_name)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "tv" -}}
{{- with $repo := (printf "%s/%s" "alexpasmantier" "television") -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s-%s.tar.gz" $repo $version $app_name $version $myArch)
"path" (printf "%s-%s-%s/%s" $app_name $version $myArch $app_name)
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "cargo-binstall" -}}
{{- with $repo := (printf "%s/%s" "cargo-bins" $app_name) -}}
2025-04-10 01:32:01 +00:00
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.full.%s" $repo $version $app_name $myArch $archive_type_short)
"path" $app_name
"executable" true
2025-04-10 01:32:01 +00:00
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
2025-04-15 17:01:53 +00:00
{{- with $app_name := "zoxide" -}}
{{- with $repo := (printf "%s/%s" "ajeetdsouza" $app_name) -}}
{{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/v%s/%s-%s-%s.tar.gz" $repo $version $app_name $version $myArch)
"path" $app_name
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- 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 $app_name := "gojq" -}}
{{- with $repo := (printf "%s/%s" "itchyny" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" "jq") (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s_%s_%s.%s" $repo $version $app_name $version $myArch $archive_type)
"path" (printf "%s_%s_%s/%s" $app_name $version $myArch $app_name)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "git-credential-oauth" -}}
{{- with $repo := (printf "%s/%s" "hickford" $app_name) -}}
{{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/v%s/%s_%s_%s.tar.gz" $repo $version $app_name $version $myArch)
"path" $app_name
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "ov" -}}
{{- with $repo := (printf "%s/%s" "noborus" $app_name) -}}
{{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/v%s/%s_%s_%s.zip" $repo $version $app_name $version $myArch)
"path" $app_name
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
2025-04-02 16:32:53 +00:00
2025-04-15 17:02:12 +00:00
{{- with $app_name := "ansi2txt" -}}
{{- with $repo := (printf "%s/%s" "gabe565" $app_name) -}}
{{- with $version := trimPrefix "v" (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/v%s/%s_%s_%s.tar.gz" $repo $version $app_name $version $myArch)
"path" $app_name
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{/*
# valid arch strings:
# linux-aarch64
# linux-arm
# linux-armv7
# linux-x86_64
# mac-x86
# mac
# win
*/}}
{{- $myArch = or (get (dict "linux" (printf "%s-%s" .chezmoi.os .sz.os.arch_alt)) .chezmoi.os) .sz.os.short }}
{{- with $app_name := "gitui" -}}
{{- with $repo := (printf "%s/%s" "extrawurst" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.tar.gz" $repo $version $app_name $myArch)
"path" (printf "./%s" $app_name)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- 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 $app_name := "lazyjournal" -}}
{{- with $repo := (printf "%s/%s" "Lifailon" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s-%s" $repo $version $app_name $version $myArch)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- if (not (eq .chezmoi.os "darwin")) -}}
{{- with $app_name := "moar" -}}
{{- with $repo := (printf "%s/%s" "walles" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s-%s" $repo $version $app_name $version $myArch)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}{{- end -}}
2025-04-04 01:58:24 +00:00
{{- $myArch = or (get (dict "darwin" "macos-universal") .chezmoi.os) $myArch }}
{{- with $app_name := "fastfetch" -}}
{{- with $repo := (printf "%s/%s" "fastfetch-cli" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.tar.gz" $repo $version $app_name $myArch)
"executable" true
"path" (printf "%s-%s/usr/bin/%s" $app_name $myArch $app_name)
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{/*
# valid arch strings:
# Darwin_arm64
# Darwin_x86_64
# Linux_arm64
# Linux_i386
# Linux_x86_64
# Windows_arm64
# Windows_i386
# Windows_x86_64
*/}}
2025-04-09 20:49:10 +00:00
{{- $myArch = .chezmoi.arch -}}
{{- if (eq .chezmoi.os "linux") -}}
{{- $myArch = .sz.os.arch_alt -}}
{{- end -}}
{{- $myArch = (printf "%s_%s" ( .chezmoi.os | title ) $myArch) -}}
{{- with $app_name := "osc" -}}
{{- with $repo := (printf "%s/%s" "theimpostor" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s_%s.tar.gz" $repo $version $app_name $myArch)
"path" $app_name
2024-12-24 20:53:54 +00:00
"executable" true
"refreshPeriod" $defaultRefresh
) -}}
{{- end -}}{{- end -}}{{- end -}}
2024-12-24 20:53:54 +00:00
2025-04-02 16:32:53 +00:00
{{/*
# 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 $app_name := "tsh" -}}
{{- with $repo := (printf "%s/%s" "gravitational" "teleport") -}}
2025-04-10 13:56:30 +00:00
{{- with $version := (gitHubReleases $repo | toJson | fromJson | jq (
printf
"map(select(.tag_name | startswith(\"v%s\")))[0] | .tag_name"
(env "TELEPORT_MAJOR"))
| first
) -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" (printf "https://cdn.teleport.dev/teleport-%s-%s-bin.tar.gz" $version $myArch)
"path" (printf "teleport/%s" $app_name)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end }}{{- end -}}
2025-04-02 16:32:53 +00:00
{{/* cargo-binstall besed sources */}}
{{- if and (lookPath "jq") (lookPath "cargo-binstall") -}}
{{- $path_prefix = or (get (dict "linux" "./") .chezmoi.os) "" -}}
{{- with $app_name := "eza" -}}
{{- with $bin_url := (output "sh" "-c" (
list
"cargo-binstall --log-level debug --dry-run --no-track --no-confirm --json-output"
$app_name
"| jq \".fields | select ( .message == \\\"Downloading package\\\" )\""
| join " ") | fromJson
).url
-}}
{{- with $repo := (printf "%s/%s" "eza-community" $app_name) -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" $bin_url
"path" (printf "%s%s" $path_prefix $app_name)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- with $app_name := "vivid" -}}
{{- with $bin_url := (output "sh" "-c" (
list
"cargo-binstall --log-level debug --dry-run --no-track --no-confirm --json-output"
$app_name
"| jq \".fields | select ( .message == \\\"Downloading package\\\" )\""
| join " ") | fromJson
).url
-}}
{{- with $path := trimSuffix ".zip" (trimSuffix ".tgz" (trimSuffix ".tar" (trimSuffix ".gz" (base $bin_url)))) -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
"url" $bin_url
"path" (printf "%s/%s" $path $app_name)
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- end -}}
{{- $externals | toYaml -}}
{{- else -}}
# This is a truncated version of .chezmoiexternal because CZ_EXTR env is undefined
{{- end }}
2024-09-19 04:31:48 +00:00
".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 }}"
2024-09-19 04:31:48 +00:00
".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 }}"
2024-11-25 22:47:51 +00:00
".config/sz.env/lib/complete-alias":
type: "file"
url: "https://github.com/cykerway/complete-alias/raw/refs/heads/master/complete_alias"
refreshPeriod: "{{ $defaultRefresh }}"
2025-04-07 21:49:59 +00:00
{{ if (and ( eq .chezmoi.os "linux" ) ( ne .chezmoi.osRelease.id "centos" )) -}}
2024-11-25 22:47:51 +00:00
".local/bin/nvim.AppImage":
type: "file"
url: "https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.appimage"
2024-11-25 22:47:51 +00:00
executable: true
refreshPeriod: "{{ $defaultRefresh }}"
2025-04-02 16:32:53 +00:00
{{- end -}}
# vim: set ft=yaml expandtab tabstop=2 shiftwidth=2: