Compare commits
2 Commits
a778997fdf
...
4902e24069
Author | SHA1 | Date | |
---|---|---|---|
|
4902e24069 | ||
|
0fca37b41a |
188
.README.md
188
.README.md
@ -1,82 +1,12 @@
|
||||
<!-- markdownlint-disable line-length no-inline-html no-duplicate-heading -->
|
||||
# Bare Git Repository
|
||||
|
||||
- <https://www.atlassian.com/git/tutorials/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 <git-repo-url> $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
|
||||
- [Debian packages](#debian)
|
||||
- [dotfiles](#dotfiles)
|
||||
- [System Config](#syscfg)
|
||||
- [Qubes proxy scripts](#qubes)
|
||||
- dotfiles (see above)
|
||||
- [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,14 +48,11 @@ git apply --stat --apply 2604.patch
|
||||
- check _Limit outgoing connections_;
|
||||
- check _Allow full access for 25 minutes_.
|
||||
|
||||
## System Config
|
||||
|
||||
- [SysRq](https://www.kicksecure.com/wiki/SysRq)
|
||||
|
||||
## Debian Packages {#debian}
|
||||
|
||||
```sh
|
||||
apt install --no-install-recommends \
|
||||
aptitude \
|
||||
curl fd-find fzf git grc ripgrep \
|
||||
vim-nox vim-tiny- wget xdg-utils \
|
||||
|
||||
@ -140,11 +67,93 @@ dpkg-divert --rename --divert /usr/share/zsh-autosuggestions/disabled \
|
||||
/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
```
|
||||
|
||||
## dotfiles — Bare Git Repository {#dotfiles}
|
||||
|
||||
- <https://www.atlassian.com/git/tutorials/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 <git-repo-url> $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}
|
||||
|
||||
for file in ${BKDIR%/}/*(D); {
|
||||
ls -lh ${file} ./${file#${BKDIR}}; read;
|
||||
vimdiff ${file} ./${file#${BKDIR}} }
|
||||
```
|
||||
|
||||
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 /etc/skel/.dotfiles
|
||||
sudo chown $(whoami) -R /etc/skel/.config
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
## System Config {#syscfg}
|
||||
|
||||
- [SysRq](https://www.kicksecure.com/wiki/SysRq)
|
||||
- `sudo cp -aiv ~/.aptitude /root`
|
||||
|
||||
## Qubes proxy scripts {#qubes}
|
||||
|
||||
```sh
|
||||
export ALL_PROXY=127.0.0.1:8082
|
||||
chmod +x $HOME/bin/*-proxy
|
||||
|
||||
export ALL_PROXY=127.0.0.1:8082
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
||||
TODO: Insert random part in filenames.
|
||||
@ -153,14 +162,23 @@ TODO: Insert random part in filenames.
|
||||
|
||||
`.zshrc` will install `asdf`.
|
||||
|
||||
Make sure you have the required [system dependencies](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
|
||||
before installing/compiling Python.
|
||||
Before installing/compiling Python, make sure you have the required
|
||||
[system dependencies](https://github.com/pyenv/pyenv/wiki#suggested-build-environment).
|
||||
|
||||
```sh
|
||||
sudo apt install --no-install-recommends XXX
|
||||
sudo apt install --no-install-recommends \
|
||||
build-essential libssl-dev zlib1g-dev \
|
||||
libbz2-dev libreadline-dev libsqlite3-dev curl \
|
||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
|
||||
|
||||
asdf plugin add direnv
|
||||
asdf install direnv latest
|
||||
asdf direnv setup --version latest
|
||||
asdf global direnv latest
|
||||
|
||||
asdf plugin add python
|
||||
|
||||
for Plugin in $(asdf plugin list); { echo $Plugin; asdf list $Plugin }
|
||||
```
|
||||
|
||||
## Newer Debian packages {#versions_check}
|
||||
@ -168,10 +186,12 @@ asdf plugin add python
|
||||
```sh
|
||||
cd ~/bin
|
||||
asdf current
|
||||
asdf local direnv latest
|
||||
asdf install
|
||||
direnv allow
|
||||
python -m pip install -r requirements.txt
|
||||
|
||||
cd ~/Downloads
|
||||
versions_check
|
||||
|
||||
wget-proxy https://...
|
||||
@ -181,7 +201,7 @@ dpkg -i *.deb
|
||||
## Fonts {#fonts}
|
||||
|
||||
- [JetBrains Mono](https://www.jetbrains.com/lp/mono/)
|
||||
- Install the files **without** “NL” (No Ligatures) in their names
|
||||
- Choose files **without** “NL” (No Ligatures) in their names
|
||||
|
||||
- [Nerd Fonts](https://www.nerdfonts.com/)
|
||||
- [Download](https://github.com/ryanoasis/nerd-fonts/tags)
|
||||
@ -211,7 +231,9 @@ See also [How to install and manage fonts on Linux](https://linuxconfig.org/how-
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo mkdir -p /opt/fonts
|
||||
sudo mv folder /opt/fonts
|
||||
sudo chown root:root -R /opt/fonts
|
||||
fc-cache -fv /opt/fonts
|
||||
```
|
||||
|
||||
|
3
.zshrc
3
.zshrc
@ -50,7 +50,8 @@ typeset -U path fpath
|
||||
### ASDF & direnv
|
||||
#
|
||||
if [[ -e "${XDG_CONFIG_HOME}/asdf-direnv/zshrc" ]]; then
|
||||
source "${XDG_CONFIG_HOME}/asdf-direnv/zshrc"
|
||||
# Don't modify next line, it is searched by "direnv s$etup"
|
||||
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
|
||||
else
|
||||
echo "asdf: direnv plugin not set!"
|
||||
# asdf plugin add direnv
|
||||
|
Loading…
Reference in New Issue
Block a user