|
1 | | -# Rick Cogley's dotfiles |
| 1 | +# Rick Cogley's Dotfiles |
2 | 2 |
|
3 | | -I've been trying various methods to manage my dotfiles and get them onto systems, but, it turns out that the easiest thing is to just use Gnu `stow`, with some shell scripts for non-dotfile system setup. There is a good reason to use something like [Homemaker](https://github.com/FooSoft/homemaker), written in Go, because it has no dependencies so you don't need elevated privileges to install it on any given system, and it can handle configuration, not just your dotfile linking. That said, for me it is not such a challenge so far, to install `git` and `stow` on any server I'm managing. If those are not present and I really need my dotfiles on a system, there's always `rsync`. Once they are linked in, just run a couple of scripts to install what you need. |
| 3 | +A comprehensive, modular dotfiles repository using GNU Stow for symlink management, |
| 4 | +designed for macOS development environments with security and maintainability in mind. |
4 | 5 |
|
5 | | -Here's what I do on a new system assuming `git` and `stow` are installed: |
| 6 | +## Quick Start |
6 | 7 |
|
7 | | -~~~~~ |
8 | | -% cd $HOME |
9 | | -% git clone https://github.com/RickCogley/dotfiles.git .dotfiles |
10 | | -% cd .dotfiles |
11 | | -% stow zsh |
12 | | -% stow vim |
13 | | -% cd |
14 | | -% ls -la #confirm .zshrc, .vimrc etc |
15 | | -~~~~~ |
| 8 | +```bash |
| 9 | +# Clone the repository |
| 10 | +cd $HOME |
| 11 | +git clone https://github.com/RickCogley/dotfiles.git .dotfiles |
| 12 | +cd .dotfiles |
16 | 13 |
|
17 | | -The `stow zsh` for instance, just finds the folder `zsh`, and creates symbolic links to its contents in the _parent_ folder, even respecting subfolders. Because your dotfiles repo has been cloned into `$HOME/.dotfiles`, the symbolic links get created in your user folder, so everything just works as expected. Then you just edit and do your git operations on the files in `~/.dotfiles`, and the links will of course just reference those. |
| 14 | +# Apply configurations |
| 15 | +stow git zsh vim |
18 | 16 |
|
19 | | -Some files might contain secrets, so you can symmetrically encrypt those before committing, then decrypt after using stow. For example these files: |
| 17 | +# Set up your private configuration |
| 18 | +cp ~/.gitconfig.local.template ~/.gitconfig.local |
| 19 | +$EDITOR ~/.gitconfig.local # Add your GPG key and other secrets |
| 20 | +``` |
20 | 21 |
|
21 | | -~~~~~ |
22 | | -.dotfiles/twty/.config/twty/settings.json.gpg |
23 | | -.dotfiles/git/.gh.json.gpg |
24 | | -.dotfiles/git/.gist-vim.gpg |
25 | | -~~~~~ |
| 22 | +## What's Included |
26 | 23 |
|
27 | | -Encrypted and decrypted like this: |
| 24 | +- **Git**: Comprehensive git configuration with secure secret management |
| 25 | +- **Zsh**: Modern shell setup with Znap plugin manager and Starship prompt |
| 26 | +- **Vim**: Editor configuration and plugins |
| 27 | +- **Security**: GPG signing, SSH key management, and secret handling patterns |
| 28 | +- **Documentation**: Complete guides following industry standards |
28 | 29 |
|
29 | | -~~~~~ |
30 | | -% cd .dotfiles |
31 | | -% gpg --symmetric --cipher-algo TWOFISH twty/.config/twty/settings.json |
32 | | -% gpg —output twty/.config/twty/settings.json —decrypt twty/.config/twty/settings.json.gpg |
33 | | -~~~~~ |
| 30 | +## Key Features |
34 | 31 |
|
35 | | -**IMPORTANT:** _Do not commit the unencrypted files._ If you commit a "dummy" version of the files, you can run `git update-index --assume-unchanged thefile` to prevent accidentally committing changes. However, in this case, since the plain-text version is never wanted, add them to `.gitignore`: |
| 32 | +- 🔒 **Security-first design** - Secrets never committed to the repository |
| 33 | +- 🧩 **Modular structure** - Apply only the configurations you need |
| 34 | +- 📖 **Comprehensive documentation** - Tutorials, guides, and references |
| 35 | +- 🔄 **Cross-machine compatibility** - Consistent setup across multiple systems |
| 36 | +- 🛡️ **Split configuration** - Public configs in repo, private configs local-only |
36 | 37 |
|
37 | | -~~~~~ |
38 | | -... |
39 | | -git/.gh.json |
40 | | -git/.gist-vim.json |
41 | | -twty/.config/twty/settings.json |
42 | | -brew/.homebrew_github_api_token |
43 | | -... |
44 | | -~~~~~ |
| 38 | +## Documentation |
45 | 39 |
|
46 | | -Additionally, I'm now using the excellent «[zsh for humans](https://github.com/romkatv/zsh4humans)» mainly for its ability to copy zsh and other config files (a v3 feature) up to a remote server just by doing `z4h ssh me@theserver.com`. Smart! Especially if you're mostly only ssh-ing to the server anyway. It also has "sane defaults" so, it's easy to get started with for beginners, though I've been using `zsh` for quite some time. |
| 40 | +**📚 [Full Documentation](https://rickcogley.github.io/dotfiles/)** |
47 | 41 |
|
48 | | -Regarding the `~/.ssh` folder, its permissions and those of the remote host need to be set up as such: |
| 42 | +### Quick Links |
49 | 43 |
|
50 | | -* directory - 700 |
51 | | -* private keys - 600 |
52 | | -* public keys - 644 |
53 | | -* remote auth file - 644 |
| 44 | +- **🎓 [Getting Started Tutorial](docs/tutorials/getting-started.md)** - Step-by-step setup guide |
| 45 | +- **🏗️ [Architecture Overview](docs/explanations/architecture.md)** - How it all works |
| 46 | +- **🔐 [Security Guide](docs/explanations/security.md)** - Keeping your secrets safe |
| 47 | +- **⚙️ [Configuration Reference](docs/reference/)** - Detailed configuration docs |
54 | 48 |
|
| 49 | +### Browse by Type |
55 | 50 |
|
| 51 | +- **[Tutorials](docs/tutorials/)** - Learning-oriented guides for beginners |
| 52 | +- **[How-to Guides](docs/how-to/)** - Task-oriented solutions for specific problems |
| 53 | +- **[Reference](docs/reference/)** - Technical specifications and configuration details |
| 54 | +- **[Explanations](docs/explanations/)** - Conceptual discussions and design decisions |
| 55 | + |
| 56 | +## Why This Approach? |
| 57 | + |
| 58 | +After trying various dotfile management methods, GNU Stow emerged as the ideal solution: |
| 59 | +- **Simple and reliable** - Just creates standard symlinks |
| 60 | +- **No dependencies** - Works anywhere git and stow are available |
| 61 | +- **Transparent** - Easy to understand and debug |
| 62 | +- **Flexible** - Apply configurations selectively |
| 63 | + |
| 64 | +For systems without git/stow, rsync provides a reliable fallback option. |
| 65 | + |
| 66 | +## Philosophy |
| 67 | + |
| 68 | +These dotfiles prioritize: |
| 69 | +- **Security** over convenience |
| 70 | +- **Simplicity** over features |
| 71 | +- **Documentation** over assumptions |
| 72 | +- **Modularity** over monolithic configs |
| 73 | + |
| 74 | +## Contributing |
| 75 | + |
| 76 | +This is a personal configuration repository, but the documentation and patterns |
| 77 | +may be useful for others building their own dotfile systems. Feel free to: |
| 78 | +- Use any patterns or documentation for your own setup |
| 79 | +- Submit issues for documentation improvements |
| 80 | +- Share feedback on the architecture approach |
| 81 | + |
| 82 | +## License |
| 83 | + |
| 84 | +This repository is shared under the MIT License. See [LICENSE](LICENSE) for details. |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +**📖 For complete setup instructions and detailed documentation, visit [rickcogley.github.io/dotfiles](https://rickcogley.github.io/dotfiles/)** |
0 commit comments