/home-archive

User configuration stored in bare git repo.

Primary LanguageEmacs Lisp

Bare git repo for config files

Archive Notice

The main contents of this repo have been merged into https://github.com/shawnohare/conf and are managed along-side nix.

Introduction

User configuration managed through a bare git repo. This avoides having to explicitly symlink at the cost of wrapping git when dealing with configuration files. By default an editor might not pick up on git information for files fetched from the bare repository.

Initialization

We prefer a quick and destructive way to pull user configuration files into $HOME.

git clone --bare https://github.com/shawnohare/home.git $HOME/.git
git --git-dir=$HOME/.git/ --work-tree=$HOME checkout -f
# To optionally not show untracked files:
# cd $HOME/.git
# git config --local status.showUntrackedFiles no

An alternative is to use rsync.

git clone https://github.com/shawnohare/home.git config.tmp
rsync --recursive --verbose --exclude '.git' config.tmp/ $HOME/
rm -rf config.tmp

One benefit of cloning to ~/.git is that git will be able to directly see history, branch information, etc.

Usage

Once the configuration files are installed, a new shell session should have access to the hit alias, among other things, wraps git.

For example,

hit <cmd> [args]
# equivalent to git --git-dir=$HOME/.git work-tree=$HOME <cmd> [args]

Nix

Goals

We would like to move towards a NixOS like configuration that uses nix home-manager. In theory it would subsume much of the configuration files in this repository

On macOS this is possible nix-darwin which provides a configuration.nix experience.

Nix Setup