Configuration files for Dorab's primary machine. Other machines take the shared subset.
The repository holds the primary machine's configuration. It never holds a password, a token or a private key.
File in src/ |
Configures | Shared |
|---|---|---|
.zshenv |
zsh, every shell: Homebrew first on PATH |
Yes |
.zprofile |
zsh, login shells: Homebrew, Python, libpq, ~/.local/bin, DOTNET_ROOT |
Yes |
.zshrc |
zsh, interactive shells: aliases | Yes |
.emacs.d/init.el |
Emacs | Yes |
.tmux.conf |
tmux | Yes |
.clojure/deps.edn |
Clojure CLI aliases | Yes |
.config/git/ignore |
Files that git ignores everywhere | Yes |
.config/git/shared |
git settings every machine uses | Yes |
.config/git/config |
git on the primary machine: identity, signing, email; includes shared |
No |
.config/git/config-syntereen |
git identity for Syntereen and client repositories | No |
A file in src/ sits at the same path as it does in the home directory.
Each zsh file sources a .local file of the same name last, if it
exists: ~/.zshenv.local, ~/.zprofile.local and ~/.zshrc.local.
.tmux.conf loads ~/.tmux.conf.local the same way, for example for
a status color that shows which machine or account a session is on.
Those files hold a machine's private lines and are in no repository.
A line that only depends on what a machine has installed goes in the
shared file, behind a check that its target exists.
Secrets, such as API keys, stay out of every zsh file. On the primary
machine, they are in ~/.envsecrets as KEY=value lines, and
~/.zshrc.local exports them. Emacs takes them from the shell through
exec-path-from-shell.
Shared files hold no identity, so any machine can take them. The
Makefile lists them in SHARED. PRIMARY lists the shared files
and the primary machine's own files.
- macOS, with
make.
The files are copies, not links. make diff shows where a home
directory has drifted from the repository.
| Target | Action |
|---|---|
make or make help |
Print the targets. |
make diff |
Show how each home file differs from the repository. Changes nothing. |
make collect |
Copy the home files into src/, then print git status. Review with git diff, then commit or discard. |
make install |
Copy src/ into the home directory. It stops if a home file differs from the repository. |
make install FORCE=1 |
Copy src/ into the home directory, and overwrite home files that differ. |
make diff-shared |
Like make diff, for the shared files only. |
make install-shared |
Like make install, for the shared files only. FORCE=1 works the same way. |
DEST sets a different home directory, for example make install DEST=/tmp/test.
To keep the repository current, edit the files where they live in the
home directory. From time to time, run make collect, review the
changes, and commit them.
To set up the primary machine, run make install. On any other
machine or account, run make install-shared. The Ansible role for
the M5 does this in each account.
- Copy the file into
src/, at the same path as in the home directory. - Add that path to the
Makefile. If the file holds no identity and other machines need it, add it toSHARED. Otherwise add it toPRIMARY. Shared files reach every M5 account on the next run.
This repository is in the public domain under CC0 1.0 Universal. See LICENSE.