diff --git a/.chezmoiexternal.toml b/.chezmoiexternal.toml index 538f5f8..fae2b4a 100644 --- a/.chezmoiexternal.toml +++ b/.chezmoiexternal.toml @@ -14,3 +14,26 @@ url = "https://github.com/alacritty/alacritty-theme" refreshPeriod = "168h" {{ end }} + +{{ if and .unRootMode (eq .chezmoi.arch "amd64")}} + +{{/* 手動安裝 eza */ -}} +{{ $ezaVersion := "v0.21.3" -}} +[".local/bin/eza"] + type = "archive-file" + url = "https://github.com/eza-community/eza/releases/download/{{ $ezaVersion }}/eza_x86_64-unknown-{{ .chezmoi.os }}-gnu.tar.gz" + path = "eza" + +{{/* 手動安裝 neovim */ -}} +{{ $nvimVersion := "v0.11.1" -}} +[".local"] + type = "archive" + url = "https://github.com/neovim/neovim/releases/{{ $nvimVersion }}download/nvim-{{ .chezmoi.os }}-x86_64.tar.gz" + exact = true + stripComponents = 1 + path = "nvim-linux-x86_64" + + +{{/* 手動安裝 zsh */ -}} +{{/* 手動安裝 lazygit */ -}} +{{ end }} diff --git a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl index c2e8d15..63f5346 100644 --- a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -1,12 +1,20 @@ {{ if eq .chezmoi.os "linux" -}} +#!/bin/bash {{/* **** unRoot Mode *************************************************** */ -}} -{{ if .unRootMode -}} +{{/* 如果強制設定unRoot, */}} +{{/* 或是沒有.chezmoi.osRelease.id(因為環境有可能是Synology極精簡環境),直接視同unRoot Mode處理 */}} +{{ if or .unRootMode (not (hasKey .chezmoi.osRelease "id")) -}} +{{/* 部份已由.chezmoiexternal.toml處理了 */ -}} +{{/* 其他自訂手動安裝腳本: */ -}} +{{/* 手動安裝 eza */ -}} +# if command -v eza &> /dev/null; then +# +# fi {{/* **** Root Mode ***************************************************** */ -}} {{ else -}} -#!/bin/bash {{/* ==== Debian ======================================================== */ -}} {{ if or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "ubuntu") -}}