diff --git a/.README.md b/.README.md index 1caee6c..4701dbe 100644 --- a/.README.md +++ b/.README.md @@ -1,82 +1,12 @@ -# Bare Git Repository - -- -- StreakyCobra - -## Starting from scratch - -```sh -git init --bare $HOME/.dotfiles -alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' -dotfiles config --local status.showUntrackedFiles no -``` - -## Install onto a new system - -The `checkout` command is expected to fail with a message. -This is because your $HOME folder might already have some stock configuration -files which would be overwritten by Git. -The “BKDIR” part is a rough shortcut to move all the offending files -automatically to a backup folder: - -```sh -git clone --bare $HOME/.dotfiles - -export ALL_PROXY=127.0.0.1:8082 -git clone --bare https://forge.chapril.org/michel_ouba/points.git $HOME/.dotfiles - -alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' - -dotfiles config --local status.showUntrackedFiles no - -BRANCH=opt -BKDIR=".dotfiles-backup/"; -dotfiles checkout ${BRANCH} 2>&1 | egrep "\s+" | awk {'print $1'} | - xargs -I{} sh -c "mkdir -p \$(dirname ${BKDIR}{}); mv -iv {} ${BKDIR}{}"; - -dotfiles checkout ${BRANCH} -``` - -When the `fetch` configuration is not set, insert the following line in the -_remote_ section of `.dotfiles/config`: - -```config - fetch = +refs/heads/*:refs/remotes/origin/* -``` - -## Install into `/etc/skel` - -```sh -sudo mkdir -p /etc/skel/.dotfiles -sudo chown $(whoami) /etc/skel - -git clone --bare $(dotfiles remote -v | head -1 | cut -f2 | cut -f1 -d' ') /etc/skel/.dotfiles - -alias skelfiles='/usr/bin/git --git-dir=/etc/skel/.dotfiles --work-tree=/etc/skel' -skelfiles config --local status.showUntrackedFiles no -skelfiles checkout -``` - -## Useful Commands - -- List all tracked files (from CWD): - `dotfiles ls-tree --name-only -rz main | xargs -0 $(whence lsd) -lU` - -## Other Tools - -```sh -lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME -``` - -# Every-day Tools +# Installation Tips Recommended installation order: -- System Config +- [System Config](#syscfg) - [Debian packages](#debian) - [Qubes proxy scripts](#qubes) -- dotfiles (see above) +- [dotfiles](#dotfiles) - [ASDF](#asdf) & plugins - [Newer Debian packages](#versions_check) - [Fonts](#fonts) @@ -84,7 +14,7 @@ Recommended installation order: - [lazygit](#lazygit) - [nnn](#nnn) - [neovim](#neovim) -- Install into `/etc/skel` (see above) +- Install into `/etc/skel` (see dotfiles) ## Generic Tips @@ -118,7 +48,7 @@ git apply --stat --apply 2604.patch - check _Limit outgoing connections_; - check _Allow full access for 25 minutes_. -## System Config +## System Config {#syscfg} - [SysRq](https://www.kicksecure.com/wiki/SysRq) @@ -149,6 +79,76 @@ chmod +x $HOME/bin/*-proxy TODO: Insert random part in filenames. +## dotfiles — Bare Git Repository {#dotfiles} + +- +- StreakyCobra + +### Starting from scratch + +```sh +git init --bare $HOME/.dotfiles +alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' +dotfiles config --local status.showUntrackedFiles no +``` + +### Install onto a new system + +The `checkout` command is expected to fail with a message. +This is because your $HOME folder might already have some stock configuration +files which would be overwritten by Git. +The “BKDIR” part is a rough shortcut to move all the offending files +automatically to a backup folder: + +```sh +git clone --bare $HOME/.dotfiles + +export ALL_PROXY=127.0.0.1:8082 +git clone --bare https://forge.chapril.org/michel_ouba/points.git $HOME/.dotfiles + +alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' + +dotfiles config --local status.showUntrackedFiles no + +BRANCH=main +BKDIR=".dotfiles-backup/"; +dotfiles checkout ${BRANCH} 2>&1 | egrep "\s+" | awk {'print $1'} | + xargs -I{} sh -c "mkdir -p \$(dirname ${BKDIR}{}); mv -iv {} ${BKDIR}{}"; + +dotfiles checkout ${BRANCH} +``` + +When the `fetch` configuration is not set, insert the following line in the +_remote_ section of `.dotfiles/config`: + +```config + fetch = +refs/heads/*:refs/remotes/origin/* +``` + +### Install into `/etc/skel` + +```sh +sudo mkdir -p /etc/skel/.dotfiles +sudo chown $(whoami) /etc/skel + +git clone --bare $(dotfiles remote -v | head -1 | cut -f2 | cut -f1 -d' ') /etc/skel/.dotfiles + +alias skelfiles='/usr/bin/git --git-dir=/etc/skel/.dotfiles --work-tree=/etc/skel' +skelfiles config --local status.showUntrackedFiles no +skelfiles checkout +``` + +### Useful Commands + +- List all tracked files (from CWD): + `dotfiles ls-tree --name-only -rz main | xargs -0 $(whence lsd) -lU` + +### Other Tools + +```sh +lazygit --git-dir=$HOME/.dotfiles --work-tree=$HOME +``` + ## ASDF & main plugins {#asdf} `.zshrc` will install `asdf`.