Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
/ home-archive Public archive

User configuration stored in bare git repo.

Notifications You must be signed in to change notification settings

shawnohare/home-archive

Repository files navigation

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

About

User configuration stored in bare git repo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published