Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nick4eva committed Oct 11, 2024
1 parent fc46f3d commit bde9301
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include test.mk

.DEFAULT_GOAL := all
.PHONY: git
.PHONY: git zsh

all: system nix devbox terminal #devops neovim ## Install and configure everything (default)
all: system nix zsh devbox terminal #devops neovim ## Install and configure everything (default)
help: ## Display help
@grep -hE '^[a-zA-Z_0-9%-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

Expand All @@ -16,7 +16,7 @@ system-configure: ## Create directories, install fonts, etc.
git: ## Configure git
@./scripts/git.sh configure

terminal: zsh ohmyzsh git starship-configure bat-configure delta-configure direnv-configure #lsd fzf ripgrep shellcheck lazygit win32yank navi ## Setup the terminal
terminal: ohmyzsh git starship-configure bat-configure delta-configure direnv-configure #lsd fzf ripgrep shellcheck lazygit win32yank navi ## Setup the terminal
nix: ## Nix install
@./scripts/nix.sh install
devbox: devbox-install devbox-configure ## Install and configure devbox
Expand Down
10 changes: 8 additions & 2 deletions scripts/devbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ do_install() {
do_configure() {
info "[devbox] Configure"
info "[devbox][configure] Create dir"
mkdir -p "$HOME/.local/share/devbox/global/default"
DEVBOX_GLOBAL_DIR="$HOME/.local/share/devbox/global/default"
mkdir -p "$DEVBOX_GLOBAL_DIR"
info "[devbox][configure] Create symlinks"
ln -fs "$(pwd)/devbox/devbox.json" "$HOME/.local/share/devbox/global/default/devbox.json"
ln -fs "$(pwd)/devbox/devbox.json" "$DEVBOX_GLOBAL_DIR/devbox.json"
# echo "eval '$(devbox global shellenv)'" >> ~/.zshrc
# source ~/.zshrc
# temporarily add the global packages to the current shell (this is already configured in oh-my-zsh)
source <(devbox global shellenv --init-hook)
devbox global install
refresh-global
}

main() {
Expand Down
3 changes: 3 additions & 0 deletions scripts/zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ do_configure() {
info "[zsh] Install"
sudo apt-get install -qq -y zsh
info "[zsh] Configure"
info "[zsh][configure] Create empty config if config is missing"
# TODO add check to create empty config only if config is missing
echo "# Empty config created by dotfiles (will be replaced by oh-my-zsh)" >> ~/.zshrc
info "[zsh][configure] Set as default shell"
chsh -s "$(which zsh)"
}
Expand Down

0 comments on commit bde9301

Please sign in to comment.