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

302 lines
11 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 := "" -}}
{{- $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 -}}
{{- $archive_type := or (get (dict "linux" "tgz") .chezmoi.os) "zip" }}
{{- with $app_name := "cargo-binstall" -}}
{{- with $repo := (printf "%s/%s" "cargo-bins" $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.full.%s" $repo $version $app_name $myArch $archive_type)
"path" $app_name
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
2025-04-08 19:47:02 +00:00
{{- if (eq .chezmoi.os "linux") -}}
{{- with $app_name := "vivid" -}}
{{- with $repo := (printf "%s/%s" "sharkdp" $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
2025-04-09 17:22:37 +00:00
) -}}{{- end -}}{{- end -}}{{- end -}}
2025-04-09 17:40:56 +00:00
{{ $myArch = (printf "%s-%s" .sz.os.arch_alt "unknown-linux-gnu" )}}
2025-04-09 17:22:37 +00:00
{{- with $app_name := "eza" -}}
{{- with $repo := (printf "%s/%s" "eza-community" $app_name) -}}
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file"
2025-04-09 17:40:56 +00:00
"url" (printf "https://github.com/%s/releases/download/%s/%s_%s.tar.gz" $repo $version $app_name $myArch)
"path" (printf "./%s" $app_name)
2025-04-09 17:22:37 +00:00
"executable" true
"refreshPeriod" $defaultRefresh
) -}}{{- end -}}{{- end -}}{{- end -}}
{{- end -}}{{/* if linux */}}
2025-04-07 22:08:21 +00:00
{{/*
# 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 := "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
{{/*
# 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 $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
{{/*
# 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") -}}
{{- 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
{{- $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 -}}