diff --git a/README.md b/README.md index cff9bbb..f26be1c 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,25 @@ Developer config files. | Tool | Description | | -------- | ----------- | -| Homebrew | Package management | -| Nix | Package management (experimental) | +| Homebrew | Package management (Mac) | +| Nix | Package management (Linux) | | Fish | Shell | | Git | Version control | | Neovim | Editor | -MacOS is my primary work environment, hence Homebrew. This setup can be deployed on Linux too. I am aware of criticisms with Homebrew on Linux, but it fits my needs. Nix is being considered as an alternative. - ### Usage Run the interactive installer for Mac/Linux: `./install.sh` -If you decline every prompt, it looks like this: +Keep pressing `Enter` to accept every prompt in order. ``` > ./install.sh -Install Homebrew? [Y/n] n -Install Homebrew packages? [Y/n] n -Install Nix? [Y/n] n -Install Nix packages? [Y/n] n -Set login shell? [Y/n] n -Create symlinks? [Y/n] n -Install vim plugins? [Y/n] n +Install package mananger? [Y/n] +Install packages? [Y/n] +Set login shell? [Y/n] +Create symlinks? [Y/n] +Install vim plugins? [Y/n] ``` -These steps _should_ be executed in order. You can safely rerun a step if needed; it tries to be idempotent. Backups are created if you have existing configs that would be overwritten. Definitely do not create symlinks until you have installed the [required](brew/Brewfile) packages (the config files depend on them). +Backups are created for existing files that get replaced. diff --git a/brew/.gitignore b/brew/.gitignore deleted file mode 100644 index 55acb54..0000000 --- a/brew/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Brewfile.lock.json diff --git a/brew/Brewfile b/brew/Brewfile deleted file mode 100644 index 9c039c4..0000000 --- a/brew/Brewfile +++ /dev/null @@ -1,11 +0,0 @@ -tap "homebrew/bundle" -tap "homebrew/core" - -brew "bat" -brew "diff-so-fancy" -brew "fd" -brew "fish" -brew "fzf" -brew "neovim" -brew "ripgrep" -brew "tree" diff --git a/brew/casks.txt b/install/homebrew-casks.txt similarity index 100% rename from brew/casks.txt rename to install/homebrew-casks.txt diff --git a/brew/brews.txt b/install/homebrew-formulas.txt similarity index 96% rename from brew/brews.txt rename to install/homebrew-formulas.txt index cfb5c5e..3cf2b9c 100644 --- a/brew/brews.txt +++ b/install/homebrew-formulas.txt @@ -15,6 +15,7 @@ fzy gawk gcc git +git-filter-repo gitup go gradle diff --git a/brew/install-extra.fish b/install/install-brew-extra.fish similarity index 89% rename from brew/install-extra.fish rename to install/install-brew-extra.fish index 27eee1f..e74ad89 100755 --- a/brew/install-extra.fish +++ b/install/install-brew-extra.fish @@ -35,9 +35,9 @@ end set --local script_dir (dirname (status -f)) if contains -- '--casks' $argv - _install_extra_casks (string join '/' -- $script_dir 'casks.txt') + _install_extra_casks (string join '/' -- $script_dir 'homebrew-casks.txt') else - _install_extra_brews (string join '/' -- $script_dir 'brews.txt') + _install_extra_brews (string join '/' -- $script_dir 'homebrew-formulas.txt') end functions --erase _install_extra_brews diff --git a/install/install-brew-packages.sh b/install/install-brew-packages.sh index 73ab865..ca761be 100755 --- a/install/install-brew-packages.sh +++ b/install/install-brew-packages.sh @@ -5,9 +5,17 @@ echo "***** INSTALL HOMEBREW PACKAGES *****" DOTFILES=$(cd "$(dirname "$0")/.." && pwd) # Install required tools -brew bundle install --file="$DOTFILES/brew/Brewfile" +brew install \ + bat \ + diff-so-fancy \ + fd \ + fish \ + fzf \ + neovim \ + ripgrep \ + tree # Install optional tools (prompted by fzf) -"$DOTFILES/brew/install-extra.fish" +"$DOTFILES/install/install-brew-extra.fish" echo diff --git a/install/install-nix-packages.sh b/install/install-nix-packages.sh index 1b64f36..3c79fd6 100755 --- a/install/install-nix-packages.sh +++ b/install/install-nix-packages.sh @@ -5,14 +5,15 @@ echo "***** INSTALL NIX PACKAGES *****" NIX_ENV="$HOME/.nix-profile/bin/nix-env" if [ -x "$NIX_ENV" ]; then - "$NIX_ENV" -iA nixpkgs.bat - "$NIX_ENV" -iA nixpkgs.fd - "$NIX_ENV" -iA nixpkgs.fish - "$NIX_ENV" -iA nixpkgs.fzf - "$NIX_ENV" -iA nixpkgs.neovim - "$NIX_ENV" -iA nixpkgs.ripgrep - "$NIX_ENV" -iA nixpkgs.tree - "$NIX_ENV" -iA nixpkgs.gitAndTools.diff-so-fancy + "$NIX_ENV" -iA \ + nixpkgs.bat \ + nixpkgs.gitAndTools.diff-so-fancy \ + nixpkgs.fd \ + nixpkgs.fish \ + nixpkgs.fzf \ + nixpkgs.neovim \ + nixpkgs.ripgrep \ + nixpkgs.tree else echo "Cannot install Nix packages! $NIX_ENV is not executable." fi