diff options
Diffstat (limited to 'posts/dotfiles.md')
-rw-r--r-- | posts/dotfiles.md | 142 |
1 files changed, 25 insertions, 117 deletions
diff --git a/posts/dotfiles.md b/posts/dotfiles.md index b6c9fd0..f339f2b 100644 --- a/posts/dotfiles.md +++ b/posts/dotfiles.md @@ -1,118 +1,26 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Justine Smithies blog - No Title</title> - <link rel="icon" href="public/favicon-32x32.png" type="image/png" sizes="32x32"> - <link href="https://justine.smithies.me.uk/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts"> - <style> - body { - font-family: sans-serif; - margin: 0 auto; - max-width: 48rem; - line-height: 1.45; - padding: 0.5rem 1.6rem; - } - a { - color: #000000; - font-weight: bold; - } - a:link { - text-decoration: none; - } - a:hover { - text-decoration: underline; - } - main { - padding: 0 1.4rem; - hyphens: auto; - } - code { - border: 1px solid; - padding: 0.1rem 0.3rem; - tab-size: 4; - } - pre { - border: 1px solid; - } - pre code { - display: block; - overflow-x: auto; - padding: 0.3rem 0.6rem; - } - nav ul { - margin: 0; - padding: 0; - display: flex; - justify-content: center; - } - nav li { - list-style: none; - } - nav li * { - display: block; - padding: 0 0.4rem; - color: black; - } - nav li strong { - padding-left: 1.5rem; - padding-right: 1rem; - } - nav a { - text-decoration: none; - } - nav a:hover { - - } - header { - border-bottom: 1px dashed grey; - margin: 0rem 0; - padding: 1rem 15px; - text-align: center; - } - footer { - border-top: 1px dashed grey; - margin: 2rem 0; - padding: 1rem 15px; - text-align: center; - color: #000000; - } - </style> -</head> -<body> -<header> -<nav> - <ul> - <li><img src="public/tux-1.png" alt="Tux" style="width:100px;height:100px;"></li> - <li><h1>Justine Smithies blog</h1>Adventures of a Linux, BSD chick</li> - </ul> - <ul> - <li><a href="index.html">Home</a></li> - <li><a href="about.html">About</a></li> - </ul> -</nav> -</header> -<main> +# How I store my dotfiles. -</main> -<footer> - <small> - <span><a href="#">↑ Back to Top</a></span><br><br> - Powered by <a href="https://www.freebsd.org/">FreeBSD</a><br> - Built with <a href="https://git.smithies.me.uk/blarg">blarg</a> a mix of both <a - href="https://github.com/karlb/karl.berlin/tree/master">blog.sh</a> and <b>barf</b>. - The code for this site is licensed under <a - href="https://git.smithies.me.uk/blarg/tree/LICENSE">MIT</a>. <br> - Here's the blog's <a href="atom.xml">Atom feed</a>. <br><br> - <img src="./public/fediverse.png" alt="Smithies SNAC Instance" width="16" height="16" style="vertical-align:middle;"> - <a rel="me" href="https://snac.smithies.me.uk/justine">Fediverse</a> - <img src="./public/git.png" alt="Self Hosted" width="16" height="16" style="vertical-align:middle;"> - <a href="https://git.smithies.me.uk">Git</a> - <img src="./public/email.png" alt="Email" width="16" height="16" style="vertical-align:middle;"> - <a href="mailto:justine@smithies.me.uk">Email</a><br> - ©2022 - 2024 Justine Smithies - </small> -</footer> -</body> -</html> +I use a bare repository to sync my dotfiles and set it up as follows: + +``` +git init --bare $HOME/.cfg +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no + +# The add and commit below are just an example of adding a file to the repo +config add .config/nvim/init.lua +config commit -m "Added init.lua" + +git remote add origin REMOTE_URL +git push origin master +``` + +To install them from mine or someone else's git repo do the following: + +``` +echo ".cfg" >> .gitignore +git clone --bare REMOTE-GIT-REPO-URL $HOME/.cfg +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no +config checkout +``` |