chezmoi 新增Debian支援
This commit is contained in:
parent
79d6ecf6b3
commit
db6f8611a4
@ -26,6 +26,20 @@ casks = [
|
|||||||
# 'macvim',
|
# 'macvim',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Debian -----------------------------------------------------------------------
|
||||||
|
# 特別備註:
|
||||||
|
# Debain 12 (bookworm) 沒有eza,但是有exa
|
||||||
|
# Debain 12 (bookworm) 沒有ueberzugpp,但是有ueberzug
|
||||||
|
# Debain 12 (bookworm) neovim版本太舊 0.7,lazy無法用
|
||||||
|
[packages.linux.debian]
|
||||||
|
apt = [
|
||||||
|
'zsh',
|
||||||
|
'vim',
|
||||||
|
'neovim',
|
||||||
|
'git',
|
||||||
|
'exa',
|
||||||
|
]
|
||||||
|
|
||||||
# Arch Linux -------------------------------------------------------------------
|
# Arch Linux -------------------------------------------------------------------
|
||||||
[packages.linux.arch]
|
[packages.linux.arch]
|
||||||
pacman_force = [
|
pacman_force = [
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
zsh -i -c 'zinit update'
|
if command -v zsh &> /dev/null; then
|
||||||
vim +PlugInstall +qall
|
zsh -i -c 'zinit update'
|
||||||
nvim --headless "+Lazy! update" +qa
|
fi
|
||||||
|
if command -v vim &> /dev/null; then
|
||||||
|
vim +PlugInstall +qall
|
||||||
|
fi
|
||||||
|
if command -v nvim &> /dev/null; then
|
||||||
|
nvim --headless "+Lazy! update" +qa
|
||||||
|
fi
|
||||||
|
|
||||||
{{ if not .noGUI }}
|
{{ if not .noGUI }}
|
||||||
{{ if and (eq .chezmoi.os "linux") (stat (print .chezmoi.homeDir "/.winscp")) }}
|
{{ if and (eq .chezmoi.os "linux") (stat (print .chezmoi.homeDir "/.winscp")) }}
|
||||||
|
@ -1,4 +1,25 @@
|
|||||||
{{ if eq .chezmoi.os "linux" -}}
|
{{ if eq .chezmoi.os "linux" -}}
|
||||||
|
{{/* ---- 安裝腳本 ------------------------------------------------------- */ -}}
|
||||||
|
|
||||||
|
{{/* ==== Debian ======================================================== */ -}}
|
||||||
|
{{ if eq .chezmoi.osRelease.id "debian" -}}
|
||||||
|
|
||||||
|
{{/* ---- 整理待安裝清單 -------------------------------------------------- */ -}}
|
||||||
|
{{- $aptInstall := .packages.linux.debian.apt -}}
|
||||||
|
apt_packages=( {{ $aptInstall | quoteList | join " " }} )
|
||||||
|
|
||||||
|
to_install_apt=()
|
||||||
|
for package in "${apt_packages[@]}"; do
|
||||||
|
to_install_apt+=("$package")
|
||||||
|
done
|
||||||
|
|
||||||
|
echo " - Installing packages via apt: ${to_install_apt[@]}"
|
||||||
|
if [ "$EUID" -ne 0 ]
|
||||||
|
sudo apt install -y "${to_install_apt[@]}"
|
||||||
|
else
|
||||||
|
apt install -y "${to_install_apt[@]}"
|
||||||
|
fi
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
|
||||||
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
|
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
|
||||||
|
18
Readme.md
18
Readme.md
@ -21,11 +21,13 @@ Yuan dotfile 自用環境設定檔
|
|||||||
* Manjaro Linux
|
* Manjaro Linux
|
||||||
* Arch Linux
|
* Arch Linux
|
||||||
|
|
||||||
目前已經測試過確定可用的環境組合如下:
|
目前已經測試過確定可用的環境組合與主要用途如下:
|
||||||
* macOS 15 Sequoia - 2025/5/2 測試過
|
* macOS 15 Sequoia -主要桌面電腦工作開發用 -2025/5/2 測試過
|
||||||
* Manjaro Linux - 2025/5/2 測試過
|
* Manjaro Linux -主要桌面電腦工作開發用 -2025/5/2 測試過
|
||||||
|
* Debian -伺服器主機與Container執行環境用
|
||||||
|
* Debian (無Root模式)
|
||||||
* Manjaro Linux (無GUI) - 2025/5/2 測試過
|
* Manjaro Linux (無GUI) - 2025/5/2 測試過
|
||||||
* Arch Linux (無GUI) - 2025/5/2 測試過
|
* Arch Linux (無GUI) -2025/5/2 測試過
|
||||||
|
|
||||||
都是使用一般使用者有sudo權限的帳號,目前測試直接用root帳號可能會有問題。
|
都是使用一般使用者有sudo權限的帳號,目前測試直接用root帳號可能會有問題。
|
||||||
(尤其是Arch Linux,安裝yay無法使用root帳號)
|
(尤其是Arch Linux,安裝yay無法使用root帳號)
|
||||||
@ -34,6 +36,14 @@ Yuan dotfile 自用環境設定檔
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
### Linux / macOS
|
### Linux / macOS
|
||||||
#### 安裝主dotfiles包
|
#### 安裝主dotfiles包
|
||||||
|
<details>
|
||||||
|
<summary>PS. 若是用Debian Slim 精簡版作業系統,要先安裝 curl</summary>
|
||||||
|
```
|
||||||
|
apt update && apt install curl -y
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
安裝整包設定擋與執行相關腳本
|
||||||
```
|
```
|
||||||
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply chyuaner
|
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply chyuaner
|
||||||
```
|
```
|
||||||
|
@ -138,6 +138,9 @@ elif command -v eza &> /dev/null; then
|
|||||||
zinit snippet https://github.com/eza-community/eza/blob/main/completions/zsh/_eza
|
zinit snippet https://github.com/eza-community/eza/blob/main/completions/zsh/_eza
|
||||||
alias ls='eza --color=always --icons=always'
|
alias ls='eza --color=always --icons=always'
|
||||||
#zinit light 'eza-community/eza'
|
#zinit light 'eza-community/eza'
|
||||||
|
elif command -v exa &> /dev/null; then
|
||||||
|
compdef exa='ls'
|
||||||
|
alias ls='exa --color=always --icons'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Floorp 支援 Firefox參數補齊
|
# Floorp 支援 Firefox參數補齊
|
||||||
|
Loading…
x
Reference in New Issue
Block a user