Skip to content

Commit

Permalink
Improved README, and -local files for local shell settings
Browse files Browse the repository at this point in the history
  • Loading branch information
denilsonsa committed Feb 14, 2024
1 parent f2bdf7f commit bc4d166
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
TODO: write a proper README.
My own "dotfiles", or configuration files.

## Quick setup

Upon getting to a new machine, I repeat these steps:

```bash
mkdir ~/dotfiles
cd ~/dotfiles

# Do I want to have push/write access to update the dotfiles?
git clone [email protected]:denilsonsa/dotfiles.git
# Do I want a read-only copy of the dotfiles?
git clone https://github.com/denilsonsa/dotfiles.git

./install
```

It is desirable to set SSH before setting up the dotfiles. SSH is required when cloning the repository with read/write support. Due to the sensitive nature and due to the strict permissions required on `~/.ssh/`, there is no SSH configuration stored in this repository.

### Hard-coded paths

There are a few hard-coded paths in `.gitconfig`:

* `~/dotfiles/`, and that's why this repository should be cloned there.
* `~/myrepos/`, which should contain clones of any other personal repository.

## Local customization outside dotfiles

There are some configurations that should not be stored in dotfiles. Thus, the following files are sourced as well:

* `~/.bash-local` for bash.
* `~/.zsh-local` for zsh.
* `~/.profile-local` for both bash and zsh.
* `~/.gitconfig-local` for git.
* `~/.vim/vimrc-local` for vim, should be based on the example in this repository.

## See also

* https://dotfiles.github.io/
* http://www.anishathalye.com/2014/08/03/managing-your-dotfiles/
Expand Down
5 changes: 3 additions & 2 deletions base/.bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ fi
# It won't work if I keep prefixing my commands with space.
#command -v thefuck &> /dev/null && eval $(thefuck --alias)

# Import work-specific code, stuff specific for the company I'm working for.
[ -f "{$HOME}/.bash_company_stuff" ] && . "${HOME}/.bash_company_stuff"
# Import shell configuration specific for the current machine, not saved in the dotfiles repository.
[ -f "{$HOME}/.profile-local" ] && . "${HOME}/.profile-local"
[ -f "{$HOME}/.bash-local" ] && . "${HOME}/.bash-local"
5 changes: 3 additions & 2 deletions base/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ fi
# It won't work if I keep prefixing my commands with space.
#command -v thefuck &> /dev/null && eval $(thefuck --alias)

# Import work-specific code, stuff specific for the company I'm working for.
[ -f "${HOME}/.zsh_company_stuff" ] && . "${HOME}/.zsh_company_stuff"
# Import shell configuration specific for the current machine, not saved in the dotfiles repository.
[ -f "{$HOME}/.profile-local" ] && . "${HOME}/.profile-local"
[ -f "${HOME}/.zsh-local" ] && . "${HOME}/.zsh-local"

0 comments on commit bc4d166

Please sign in to comment.