-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate to XDG base directory specification (#16)
- Loading branch information
1 parent
b600bbe
commit 0d83ae3
Showing
87 changed files
with
447 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,14 +65,21 @@ jobs: | |
if [ -d /home/runner ]; then homedir="/home/runner"; else homedir="/Users/runner"; fi | ||
mkdir -p ${homedir}/.config/chezmoi | ||
echo '[data]' > ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' email = "[email protected]"' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' github_user = "natelandau"' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' dev_computer = false' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' use_secrets = false' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' personal_computer = false' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' homelab_member = false' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
echo ' zsh_dir = "${homedir}/.local/share/zsh"' >> ${homedir}/.config/chezmoi/chezmoi.toml | ||
cat > ${homedir}/.config/chezmoi/chezmoi.toml<< EOF | ||
[data] | ||
dev_computer = false | ||
email = "[email protected]" | ||
github_user = "natelandau" | ||
homelab_member = false | ||
is_ci_workflow = true # Set true only in CI test | ||
personal_computer = false | ||
use_secrets = false | ||
xdgCacheDir = "${homedir}/.cache" | ||
xdgConfigDir = "${homedir}/.config" | ||
xdgDataDir = "${homedir}/.local/share" | ||
xdgStateDir = "${homedir}/.local/state" | ||
EOF | ||
# ---------------------------------------------- | ||
# Install chezmoi | ||
|
@@ -94,60 +101,105 @@ jobs: | |
- name: Confirm dotfiles are installed | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
if [ -d /home/runner ]; then homedir="/home/runner"; else homedir="/Users/runner"; fi | ||
echo "------- Testing files -------" | ||
cd /home/runner | ||
# echo "pwd: $(pwd)" | ||
# ls -al | ||
existing_files=( | ||
.zshrc | ||
.bashrc | ||
.config/git/config | ||
.ssh/config | ||
.config/dotfile_source/080-linux.sh | ||
.local/share/sed/stopwords.sed | ||
) | ||
missing_files=( | ||
.config/dotfile_source/080-macos.sh | ||
Library | ||
) | ||
installed_packages=( | ||
jq | ||
pygmentize | ||
) | ||
# Confirm files exist | ||
for file in .zshrc .bashrc .gitconfig .shell .ssh/config .shell/sourced/080-linux.sh; do | ||
if [ ! -e $file ]; then | ||
for file in ${existing_files[@]}; do | ||
if [ ! -e "${homedir}/$file" ]; then | ||
echo "$file not found" | ||
exit 1 | ||
fi | ||
done | ||
# Confirm files don't exist | ||
for file in Library .shell/sourced/080-macos.sh; do | ||
if [ -e $file ]; then | ||
for file in ${missing_files[@]} ; do | ||
if [ -e "${homedir}/$file "]; then | ||
echo "$file found" | ||
exit 1 | ||
fi | ||
done | ||
# Check apt packages | ||
command -v htop 2>&1 >/dev/null || { echo "htop not found"; exit 1; } | ||
# Confirm python packages | ||
command -v pygmentize 2>&1 >/dev/null || { echo "pygmentize not found"; exit 1; } | ||
# Confirm packages are installed | ||
for package in ${installed_packages[@]}; do | ||
if [ ! $(command -v $package) ]; then | ||
echo "$package not found" | ||
exit 1 | ||
fi | ||
done | ||
# ---------------------------------------------- | ||
# MACOS: Confirm dotfiles are installed | ||
# ---------------------------------------------- | ||
- name: Confirm dotfiles are installed | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
if [ -d /home/runner ]; then homedir="/home/runner"; else homedir="/Users/runner"; fi | ||
echo "------- Testing files -------" | ||
cd /Users/runner | ||
cd ${homedir} | ||
existing_files=( | ||
.zshrc | ||
.bashrc | ||
.config/git/config | ||
.config/nano/nanorc | ||
.ssh/config | ||
.config/dotfile_source/080-macos.sh | ||
.local/share/sed/stopwords.sed | ||
) | ||
missing_files=( | ||
.config/dotfile_source/080-linux.sh | ||
) | ||
installed_packages=( | ||
jq | ||
pygmentize | ||
) | ||
# Confirm files exist | ||
for file in .zshrc .bashrc .gitconfig .shell .ssh/config Library .shell/sourced/080-macos.sh; do | ||
if [ ! -e $file ]; then | ||
for file in ${existing_files[@]}; do | ||
if [ ! -e "${homedir}/$file" ]; then | ||
echo "$file not found" | ||
exit 1 | ||
fi | ||
done | ||
# Confirm files don't exist | ||
for file in .shell/sourced/080-linux.sh; do | ||
if [ -e $file ]; then | ||
for file in ${missing_files[@]} ; do | ||
if [ -e "${homedir}/$file" ]; then | ||
echo "$file found" | ||
exit 1 | ||
fi | ||
done | ||
# Check homebrew packages | ||
command -v htop 2>&1 >/dev/null || { echo "htop not found"; exit 1; } | ||
# Confirm python packages | ||
command -v pygmentize 2>&1 >/dev/null || { echo "pygmentize not found"; exit 1; } | ||
# Confirm packages are installed | ||
for package in ${installed_packages[@]}; do | ||
if [ ! $(command -v $package) ]; then | ||
echo "$package not found" | ||
exit 1 | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ data.json | |
.venv | ||
.DS_Store | ||
reports | ||
.mypy_cache | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"files.associations": { | ||
".chezmoiremove": "plaintext", | ||
"*.toml.tmpl": "plaintext", | ||
".chezmoiignore": "plaintext" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
bin/pull_all_repos | ||
.DS_Store | ||
|
||
# Migrate to zoxide | ||
.z | ||
# Prepend with a `/` to specify a specific path relative to $HOME. | ||
|
||
# Migrate zsh data to ~/.local/share/zsh | ||
.zsh_history | ||
.zfunc/_eza | ||
.zfunc/poetry | ||
# migrate to XDG directories | ||
/.curlrc | ||
/.gitignore | ||
/.gitconfig | ||
/.nanorc | ||
/.lesshst | ||
/.digrc | ||
/.wget-hsts | ||
/.zcompdump | ||
/.python_history | ||
/.local/share/zsh/history | ||
/.sed/htmlDecode.sed | ||
/.sed/htmlEncode.sed | ||
/.sed/stopwords.sed | ||
/.zsh_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
dotfiles/.chezmoiscripts/run_onchange_after_20-osx-config.sh.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.