Awesome Open Source
Awesome Open Source

.config

These are my dotfiles. A collection of zsh, git, vim and macOS configurations. I built this repository completely from scratch, with the main focus of organization in mind.

This repository used to have a lot of installation and setup-related scripts, but I realized this method of organization was probably a bit overkill and not so portable between machines. So, currently, this repository contains my entire ~/.config directory (well, not exactly the entire directory, but most of it).

Installation

The setup scripts moved to a new repository, located at yardnsm/.setup.

Protecting Secrets

I'm using .gitattributes filters to mask out sensitive data.

After cloning this repository, you should setup the custom filters (the installer already does this automatically):

git config --local filter.vault.clean "sed -f ~/.config/clean.sed"
git config --local filter.vault.smudge "sed -f ~/.config/smudge.sed"

And create the smudge.sed, then fill it up. The installer already does this, but you can also convert the clean.sed file to a valid template:

sed 's/^.*\({{.*}}\).*$/s\/\1\/value\//' clean.sed > smudge.sed

Now, whenever you stage files, the clean.sed will prevent secrets being committed. And on checkout, the smudge.sed will inject your secrets into their proper placeholders. The smudge.sed file is ignored from being committed.


License

MIT © Yarden Sod-Moriah

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Shell (169,403
Git (34,433
Vim (18,654
Bash (18,591
Dotfiles (10,709
Zsh (7,210
Installer (6,757
Tmux (3,870