Monolithic repository for my homelab
docs | ||
jafner-tools | ||
nas | ||
router | ||
seedbox | ||
server | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
README.md |
homelab
Monolithic repository for my homelab
Getting an SSH Key
TMP=$(echo "$HOME/.ssh/$(echo $HOSTNAME)_id_rsa") && ssh-keygen -b 8192 -t rsa -C "$USER@$HOSTNAME" -f $TMP -N "" && echo "IdentityFile $TMP" > $HOME/.ssh/config && cat $(echo "$TMP").pub
- Go to Jafner -> Preferences -> SSH Keys.
- Add the pubkey and save.
Pulling Only Relevant Subdir
Per: https://stackoverflow.com/questions/4114887
~$ mkdir homelab && cd homelab/
git init
git config core.sparseCheckout true
git remote add -f origin ssh://git@gitlab.jafner.net:2229/Jafner/homelab.git
echo "<deployment name; e.g. server/>" > .git/info/sparse-checkout
git checkout main
Disabling Sparse Checkout
To disable sparse checkout, simply run git sparse-checkout disable
.
With this, it can also be re-eneabled with git sparse-checkout init
.
You can use these two commands to toggle sparse checkout.
Per: https://stackoverflow.com/questions/36190800/how-to-disable-sparse-checkout-after-enabled