install: absorb brew folder, simplify README
This commit is contained in:
parent
124436ff55
commit
471c96fea2
22
README.md
22
README.md
@ -4,29 +4,25 @@ Developer config files.
|
|||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
| -------- | ----------- |
|
| -------- | ----------- |
|
||||||
| Homebrew | Package management |
|
| Homebrew | Package management (Mac) |
|
||||||
| Nix | Package management (experimental) |
|
| Nix | Package management (Linux) |
|
||||||
| Fish | Shell |
|
| Fish | Shell |
|
||||||
| Git | Version control |
|
| Git | Version control |
|
||||||
| Neovim | Editor |
|
| 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
|
### Usage
|
||||||
|
|
||||||
Run the interactive installer for Mac/Linux: `./install.sh`
|
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.sh
|
||||||
Install Homebrew? [Y/n] n
|
Install package mananger? [Y/n]
|
||||||
Install Homebrew packages? [Y/n] n
|
Install packages? [Y/n]
|
||||||
Install Nix? [Y/n] n
|
Set login shell? [Y/n]
|
||||||
Install Nix packages? [Y/n] n
|
Create symlinks? [Y/n]
|
||||||
Set login shell? [Y/n] n
|
Install vim plugins? [Y/n]
|
||||||
Create symlinks? [Y/n] n
|
|
||||||
Install vim plugins? [Y/n] 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.
|
||||||
|
1
brew/.gitignore
vendored
1
brew/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
Brewfile.lock.json
|
|
@ -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"
|
|
@ -15,6 +15,7 @@ fzy
|
|||||||
gawk
|
gawk
|
||||||
gcc
|
gcc
|
||||||
git
|
git
|
||||||
|
git-filter-repo
|
||||||
gitup
|
gitup
|
||||||
go
|
go
|
||||||
gradle
|
gradle
|
@ -35,9 +35,9 @@ end
|
|||||||
set --local script_dir (dirname (status -f))
|
set --local script_dir (dirname (status -f))
|
||||||
|
|
||||||
if contains -- '--casks' $argv
|
if contains -- '--casks' $argv
|
||||||
_install_extra_casks (string join '/' -- $script_dir 'casks.txt')
|
_install_extra_casks (string join '/' -- $script_dir 'homebrew-casks.txt')
|
||||||
else
|
else
|
||||||
_install_extra_brews (string join '/' -- $script_dir 'brews.txt')
|
_install_extra_brews (string join '/' -- $script_dir 'homebrew-formulas.txt')
|
||||||
end
|
end
|
||||||
|
|
||||||
functions --erase _install_extra_brews
|
functions --erase _install_extra_brews
|
@ -5,9 +5,17 @@ echo "***** INSTALL HOMEBREW PACKAGES *****"
|
|||||||
DOTFILES=$(cd "$(dirname "$0")/.." && pwd)
|
DOTFILES=$(cd "$(dirname "$0")/.." && pwd)
|
||||||
|
|
||||||
# Install required tools
|
# 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)
|
# Install optional tools (prompted by fzf)
|
||||||
"$DOTFILES/brew/install-extra.fish"
|
"$DOTFILES/install/install-brew-extra.fish"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -5,14 +5,15 @@ echo "***** INSTALL NIX PACKAGES *****"
|
|||||||
NIX_ENV="$HOME/.nix-profile/bin/nix-env"
|
NIX_ENV="$HOME/.nix-profile/bin/nix-env"
|
||||||
|
|
||||||
if [ -x "$NIX_ENV" ]; then
|
if [ -x "$NIX_ENV" ]; then
|
||||||
"$NIX_ENV" -iA nixpkgs.bat
|
"$NIX_ENV" -iA \
|
||||||
"$NIX_ENV" -iA nixpkgs.fd
|
nixpkgs.bat \
|
||||||
"$NIX_ENV" -iA nixpkgs.fish
|
nixpkgs.gitAndTools.diff-so-fancy \
|
||||||
"$NIX_ENV" -iA nixpkgs.fzf
|
nixpkgs.fd \
|
||||||
"$NIX_ENV" -iA nixpkgs.neovim
|
nixpkgs.fish \
|
||||||
"$NIX_ENV" -iA nixpkgs.ripgrep
|
nixpkgs.fzf \
|
||||||
"$NIX_ENV" -iA nixpkgs.tree
|
nixpkgs.neovim \
|
||||||
"$NIX_ENV" -iA nixpkgs.gitAndTools.diff-so-fancy
|
nixpkgs.ripgrep \
|
||||||
|
nixpkgs.tree
|
||||||
else
|
else
|
||||||
echo "Cannot install Nix packages! $NIX_ENV is not executable."
|
echo "Cannot install Nix packages! $NIX_ENV is not executable."
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user