User Configuration Management

To keep my home orgamized I use vcsh and myrepos.

Setup

On a new system, install the requirements.

aursync --update --temp --chroot myrepos vcsh

Clone an existing myrepos configuration from a users $HOME.

vcsh clone git@github.com:johnramsden/mr.git

To clone a branch:

Clone an existing myrepos configuration from a users $HOME.

vcsh clone -b branch git@github.com:johnramsden/mr.git

Or the vcsh template for a new setup.

vcsh clone git@github.com:RichiH/vcsh_mr_template.git mr

It tracks the myrepos config.

cat ~/.mrconfig
[DEFAULT]
git_gc = git gc "$@"
jobs = 5

include = cat ~/.config/mr/config.d/*

and myrepos template config.

cat ~/.config/mr/available.d/mr.vcsh
[$HOME/.config/vcsh/repo.d/mr.git]
checkout = vcsh clone git://github.com/RichiH/vcsh_mr_template.git mr

The templates are stored in $HOME/.config/mr/available.d and can be changed to point to your own myrepos config.

Usage

After adding a config for all your repos in ~/.config/mr/available.d/, symlink the ones you want enabled to ~/.config/mr/config.d/.

To enable the mr config.

cd ~/.config/mr/config.d
ln -s ../available.d/mr.vcsh

Now, run mr up to clone the specified repos.

Setup SSH

To start ssh-agent with a systemd unit create ~/.config/systemd/user/ssh-agent.service.

nano ~/.config/systemd/user/ssh-agent.service
[Unit]
Description=SSH key agent

[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK

[Install]
WantedBy=default.target

Add SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket" to ~/.pam_environment

Start and enable.

systemctl --user enable --now ssh-agent

chezmoi

cd ~/.local/share git clone --config transfer.fsckobjects=false --config receive.fsckobjects=false --config fetch.fsckobjects=false git://github.com/robbyrussell/oh-my-zsh.git 'oh-my-zsh'

cd ~/.config/oh-my-zsh/custom/plugins git clone 'git@github.com:zsh-users/zsh-autosuggestions.git' 'zsh-autosuggestions'

Last updated