Skip to content

e-sp9/chezmoi-dotfiles

Repository files navigation

chezmoi-dotfiles

Neovim + シェル の設定ファイルを chezmoi で管理するリポジトリ。macOS / Linux (WSL2) / Windows に対応。

対応環境

環境 対応内容
macOS ~/.zshrc, ~/.config/nvim, ~/.config/zsh, ~/.config/ohmyposh, ~/.config/lazygit を chezmoi で展開。im-select は Homebrew があれば導入
Linux / WSL2 macOS と同じ Unix 系配置。WSL2 では zenhan.exewin32yank.exe を導入
Windows PowerShell profile を ~/Documents/PowerShell / ~/Documents/WindowsPowerShell に展開。Neovim と lazygit は ~/.config に展開後、標準位置へ同期

構成

dot_zshrc                         # ~/.zshrc
dot_config/
├── nvim/                         # ~/.config/nvim
├── zsh/                          # ~/.config/zsh
├── ohmyposh/                     # ~/.config/ohmyposh
└── lazygit/                      # ~/.config/lazygit
Documents/
├── PowerShell/Microsoft.PowerShell_profile.ps1
└── WindowsPowerShell/Microsoft.PowerShell_profile.ps1
run_once_after_install-tools.sh.tmpl
run_once_after_install-windows-tools.ps1.tmpl
run_after_sync-windows-paths.ps1.tmpl

Windows では run_after_sync-windows-paths.ps1.tmpl~/.config/nvim などを %LOCALAPPDATA% / %APPDATA% の標準位置へ同期します。

プラグイン

プラグイン 用途
folke/tokyonight.nvim カラースキーム (storm / transparent)
folke/which-key.nvim キーバインドのツールチップ表示
nvim-neo-tree/neo-tree.nvim ファイラー
echasnovski/mini.pick ファジーファインダー

セットアップ

macOS / Linux (WSL2)

chezmoi init --apply https://github.com/e-sp9/chezmoi-dotfiles.git

手元に clone 済みのリポジトリから適用する場合:

bash install.sh

run_once_after_install-tools.sh.tmpl が lazygit、macOS の im-select、WSL2 の zenhan.exe / win32yank.exe を必要に応じて導入します。

Windows

chezmoi init --apply https://github.com/e-sp9/chezmoi-dotfiles.git

手元に clone 済みのリポジトリから適用する場合:

powershell -ExecutionPolicy Bypass -File .\install.ps1

Windows では以下の標準位置にも同期されます:

  • Neovim: %LOCALAPPDATA%\nvim
  • lazygit: %APPDATA%\lazygit
  • PowerShell: ~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1
  • Windows PowerShell: ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1

run_once_after_install-windows-tools.ps1.tmplim-select.exe を winget 優先、GitHub Releases フォールバックで導入します。

運用

既存ファイルとの差分確認:

chezmoi diff

反映:

chezmoi apply

現在の実ファイルを source state に取り込む例:

chezmoi add ~/.zshrc
chezmoi add ~/.config/nvim

Pre-commit

secretlint を使ったシークレット検出を用意しています。

npm install
npm run lint:secrets

# commit hook を入れる場合(prek または pre-commit を別途インストール)
prek install

About

Cross-platform chezmoi dotfiles for Neovim, Zsh, PowerShell, and terminal tooling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors