This commit is contained in:
ryfrd 2026-03-18 20:32:25 +00:00
parent 6623ee03f6
commit 44c8324063
120 changed files with 22842 additions and 4673 deletions

View file

@ -9,20 +9,6 @@ pygmentsUseClasses = true
dark = "auto"
highlight = true
[menu]
[[menu.main]]
identifier = "👋"
name = "👋"
title = "👋"
url = "/info/"
weight = 20
[[menu.main]]
identifier = "🔎"
name = "🔎"
title = "🔎"
url = "/search/"
weight = 20
[permalinks]
posts = "/:title/"

View file

@ -4,17 +4,24 @@ date: 2026-02-16
tags:
- nixos
- restic
draft: true
draft: false
---
I'm writing this so I can hopefully remember what I did in six months.
As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can't get rid of all of it.
For example, I run forgejo on my VPS.
Now I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn't bring back any of the repos I had there previously.
This is the method I cooked up for backing up some of those important bits and bob on my VPS.
This is the method I cooked up for backing up some of those important bits and bob from my VPS.
### Restic
[Restic](https://restic.net/) is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that's the route I chose.
After browsing the [available nixos options](https://search.nixos.org/options?channel=unstable&query=restic), I came up with this little config.
It sets up a restic job to be run daily by root backing up some of `/var/lib` over sftp to the hetzner storage box (I've put in placeholder values).
```nix
{ config, ... }: {
@ -24,9 +31,10 @@ This is the method I cooked up for backing up some of those important bits and b
user = "root";
passwordFile = "/etc/nixos/secrets/restic";
paths = [
"${config.services.forgejo.stateDir}"
"/var/lib/important"
"/var/lib/stuff"
];
repository = "sftp:user@storagebox:/remotelab";
repository = "sftp:user@storagebox:/payload";
extraOptions = [
"sftp.command='ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp'"
];
@ -38,3 +46,48 @@ This is the method I cooked up for backing up some of those important bits and b
};
}
```
### Security concerns
The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at `/etc/nixos/secrets/restic`.
The first issue seems a little tricky to solve.
As far as I know there's no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I'm not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs [here](https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root)
The second issue is extremely solvable with something like [sops-nix](https://github.com/Mic92/sops-nix) which I really do intend to setup at some point I promise!
### Bonus: notifications
Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my [ntfy](https://ntfy.sh) server with an uh oh pay attention message.
```nix
systemd.services.restic-backups-vps-storage-box = {
wantedBy = [ "multi-user.target" ];
unitConfig = {
OnFailure = "restic-backups-failure-notify.service";
};
};
systemd.services.restic-backups-failure-notify = {
description = "Notify on restic backup failure";
serviceConfig = {
Type = "oneshot";
ExecStart =
"${pkgs.curl}/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic "
+ "-d 'Restic backup from VPS to storage box failed!' "
+ "-H 'Title: Backup Failed' "
+ "-H 'Priority: high' ";
User = "root";
};
};
```
Thanks for reading :)

View file

@ -19,7 +19,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn't seem to get muddy.
This was a problem for me.
- Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it's a film about the enduring power of passionate undying love this was also a major problem.
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.
### Things that intrigued me

View file

@ -1,7 +1,9 @@
---
title: Handy script for a more zen twitch experience
date: 2025-08-13
tags: bash, script, twitch
tags:
- bash
- twitch
draft: false
---

View file

@ -1 +1,5 @@
<h1>uhoh 404 :/</h1>
{{ define "main" }}
<h1>404 - Page not found</h1>
<p>The page you're looking for doesn't exist.</p>
<p><a href="{{ .Site.BaseURL }}">Go home</a></p>
{{ end }}

View file

@ -4,6 +4,6 @@
<body>
{{- partial "header.html" . -}}
<main id="content">{{ block "main" . }}{{ end }}</main>
{{ partial "footer.html" . }}
{{- partial "footer.html" . -}}
</body>
</html>

View file

@ -1,4 +1,20 @@
{{ define "main" }} {{ range where site.RegularPages "Type" "in"
site.Params.mainSections }}
<a href="{{ .RelPermalink}}">{{ .Title }}</a>
{{ end }} {{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ $years := .Pages.GroupByDate "2006" }}
<ul class="year-list">
{{ range $years }}
<li>
<span class="year">{{ .Key }}</span>
<ul class="post-list">
{{ range .Pages }}
<li>
<time>{{ .Date.Format "Jan 2" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
{{ end }}

View file

@ -1,36 +1,24 @@
{{ define "main" }}
<h1>Search</h1>
<p>Search posts by keyword.</p>
<p>This is not a very clever search. It simply looks if the content of a post contains your query. </p>
<input type="text" id="search" placeholder="🔎 leaf through the archive"/>
<input type="text" id="search" placeholder="Search..." />
<ul id="results"></ul>
<p>Alternatively, this is everything.</p>
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $years := $pages.GroupByDate "2006" }}
<ul class="tree">
{{ range $years }}
<li>
<span class="folder">{{ .Key }}</span>
<ul>
{{ $months := .Pages.GroupByDate "January" }}
{{ range $months }}
<li>
<span class="folder">{{ .Key }}</span>
<ul>
{{ range .Pages }}
<li>
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</li>
{{ with site.Taxonomies.tags }}
<section class="tags">
<h2>Tags</h2>
{{ $tags := slice }}
{{ range $name, $taxonomy := . }}
{{ $tags = $tags | append (dict "name" $name "count" $taxonomy.Count) }}
{{ end }}
</ul>
{{ $sorted := sort $tags "count" "desc" }}
<div class="tag-list">
{{ range $i, $tag := $sorted }}
{{ if $i }}<span class="sep">·</span>{{ end }}
<a href="{{ "tags/" | relURL }}{{ $tag.name | urlize }}">{{ $tag.name }}</a>
{{ end }}
</div>
</section>
{{ end }}
{{ end }}

View file

@ -1,15 +1,18 @@
{{ define "main" }}
<article>
<header id="post-header">
<h2>{{ .Title }}</h2>
<div>
{{- if isset .Params "date" -}} {{ if eq .Lastmod .Date }}
<p>{{ .Date | time.Format (i18n "post.created") }}</p>
{{ else }}
<p>{{ .Lastmod | time.Format (i18n "post.updated") }}</p>
{{ end }} {{- end -}}
</div>
<article class="post">
<header>
<h1>{{ .Title }}</h1>
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
{{ with .Params.tags }}
<div class="tags">
{{ range . }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
</header>
{{- .Content -}}
<div class="content">
{{ .Content }}
</div>
</article>
{{ end }}

View file

@ -0,0 +1,11 @@
{{ define "main" }}
<h1>Tags</h1>
<ul class="post-list">
{{ range .Pages }}
<li>
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}

View file

@ -0,0 +1,18 @@
{{ define "main" }}
{{ $years := .Pages.GroupByDate "2006" }}
<ul class="year-list">
{{ range $years }}
<li>
<span class="year">{{ .Key }}</span>
<ul class="post-list">
{{ range .Pages }}
<li>
<time>{{ .Date.Format "Jan 2 2006" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
{{ end }}

View file

@ -1,9 +1,26 @@
{{ define "main" }}
{{ range first 5 (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
<article>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<p>{{ .Date.Format "Jan 2, 2006" }}</p>
<p>{{ .Summary }}</p>
</article>
{{ end }}
<section class="intro">
<p>This is a place to document bits and bobs I've been up to that have interested me. Expect linux and self-hosting tinkering, some novice programming, and maybe the occasional recipe. I tend to be a fool so take anything written here with a pinch of salt :)</p>
</section>
{{ $posts := where site.RegularPages "Type" "in" site.Params.mainSections }}
<section class="archive">
{{ $years := $posts.GroupByDate "2006" }}
<ul class="year-list">
{{ range $years }}
<li>
<span class="year">{{ .Key }}</span>
<ul class="post-list">
{{ range .Pages }}
<li>
<time>{{ .Date.Format "Jan 2" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</section>
{{ end }}

View file

@ -1,8 +1,8 @@
<footer id="footer">
<footer class="site-footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<!-- search javascript -->
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<script src="/js/script.js"></script>
</footer>

View file

@ -1,16 +1,19 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}">
{{ end }}
{{ printf `<link rel="shortcut icon" href="%s">` ("favicon.ico" | absURL) | safeHTML }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}">
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title>
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<link rel="canonical" href="{{ .Permalink }}" />
<title>{{ .Title }}</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>

View file

@ -1,14 +1,11 @@
<header id="banner">
<nav class="navbar">
<!-- home -->
<a href="{{ .Site.BaseURL }}" class="home">🏠</a>
<!-- menu items -->
{{ range .Site.Menus.main.ByWeight -}} {{ .Pre }}<a
href="{{ .URL }}"
title="{{ .Title }}"
>{{- .Name -}}</a
>{{ .Post }} {{- end }}
<!-- theme toggle -->
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<header class="site-header">
<nav>
<a href="{{ .Site.BaseURL }}" class="home">~</a>
<div class="nav-links">
{{ range .Site.Menus.main.ByWeight }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
<a href="/search">/</a>
</div>
</nav>
</header>

View file

@ -1 +1,37 @@
<h1>uhoh 404 :/</h1>
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/404.html" />
<title>404 Page not found - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<h1>404 - Page not found</h1>
<p>The page you're looking for doesn't exist.</p>
<p><a href="http://localhost:1313/">Go home</a></p>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,45 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/achieve-peak-rice-with-nix-colors/" />
<title>Achieve peak rice with nix-colors - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/" />
<title>Achieve peak rice with nix-colors</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Achieve peak rice with nix-colors</h2>
<div>
<p>March 13, 2023</p>
<article class="post">
<header>
<h1>Achieve peak rice with nix-colors</h1>
<time>Mar 13, 2023</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
<a href="/tags/home-manager">home-manager</a>
<a href="/tags/nix-colors">nix-colors</a>
</div>
</header><p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
</header>
<div class="content">
<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&rsquo;. Next thing you know you&rsquo;ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
<p>This will be a quick rundown of how I&rsquo;ve got things set up; this is basically just a rehash of <a href="https://sr.ht/~misterio/nix-colors/#setup">this</a>.</p>
@ -122,16 +127,16 @@
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">]</span>
</span></span></code></pre></div><p>That&rsquo;s it for today. Thank you to the <a href="https://github.com/Misterio77">hero</a> that made this.</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -0,0 +1,50 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/adventures-in-running-headscale-on-nixos/" />
<title>adventures in running headscale on nixos - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article class="post">
<header>
<h1>adventures in running headscale on nixos</h1>
<time>Jun 25, 2024</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
</div>
</header>
<div class="content">
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -0,0 +1,119 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/backing-up-nixos-state-with-restic/" />
<title>Backing up nixos state with restic - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article class="post">
<header>
<h1>Backing up nixos state with restic</h1>
<time>Feb 16, 2026</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
<a href="/tags/restic">restic</a>
</div>
</header>
<div class="content">
<p>I&rsquo;m writing this so I can hopefully remember what I did in six months.</p>
<p>As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&rsquo;t bring back any of the repos I had there previously.</p>
<p>This is the method I cooked up for backing up some of those important bits and bob from my VPS.</p>
<h3 id="restic">Restic</h3>
<p><a href="https://restic.net/">Restic</a> is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&rsquo;s the route I chose.
After browsing the <a href="https://search.nixos.org/options?channel=unstable&amp;query=restic">available nixos options</a>, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of <code>/var/lib</code> over sftp to the hetzner storage box (I&rsquo;ve put in placeholder values).</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="cl"><span class="p">{</span> <span class="n">config</span><span class="o">,</span> <span class="o">...</span> <span class="p">}:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">services</span><span class="o">.</span><span class="n">restic</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">backups</span><span class="o">.</span><span class="s2">&#34;hetzner-storage-box&#34;</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">initialize</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">user</span> <span class="o">=</span> <span class="s2">&#34;root&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">passwordFile</span> <span class="o">=</span> <span class="s2">&#34;/etc/nixos/secrets/restic&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">paths</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;/var/lib/important&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;/var/lib/stuff&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">];</span>
</span></span><span class="line"><span class="cl"> <span class="n">repository</span> <span class="o">=</span> <span class="s2">&#34;sftp:user@storagebox:/payload&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">extraOptions</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;sftp.command=&#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&#39;&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">];</span>
</span></span><span class="line"><span class="cl"> <span class="n">timerConfig</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">OnCalendar</span> <span class="o">=</span> <span class="s2">&#34;daily&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">Persistent</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><h3 id="security-concerns">Security concerns</h3>
<p>The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at <code>/etc/nixos/secrets/restic</code>.</p>
<p>The first issue seems a little tricky to solve.
As far as I know there&rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs <a href="https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root">here</a></p>
<p>The second issue is extremely solvable with something like <a href="https://github.com/Mic92/sops-nix">sops-nix</a> which I really do intend to setup at some point I promise!</p>
<h3 id="bonus-notifications">Bonus: notifications</h3>
<p>Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my <a href="https://ntfy.sh">ntfy</a> server with an uh oh pay attention message.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="cl"> <span class="n">systemd</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">restic-backups-vps-storage-box</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">wantedBy</span> <span class="o">=</span> <span class="p">[</span> <span class="s2">&#34;multi-user.target&#34;</span> <span class="p">];</span>
</span></span><span class="line"><span class="cl"> <span class="n">unitConfig</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">OnFailure</span> <span class="o">=</span> <span class="s2">&#34;restic-backups-failure-notify.service&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="n">systemd</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">restic-backups-failure-notify</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">description</span> <span class="o">=</span> <span class="s2">&#34;Notify on restic backup failure&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">serviceConfig</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">Type</span> <span class="o">=</span> <span class="s2">&#34;oneshot&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">ExecStart</span> <span class="o">=</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;</span><span class="si">${</span><span class="n">pkgs</span><span class="o">.</span><span class="n">curl</span><span class="si">}</span><span class="s2">/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &#34;</span>
</span></span><span class="line"><span class="cl"> <span class="o">+</span> <span class="s2">&#34;-d &#39;Restic backup from VPS to storage box failed!&#39; &#34;</span>
</span></span><span class="line"><span class="cl"> <span class="o">+</span> <span class="s2">&#34;-H &#39;Title: Backup Failed&#39; &#34;</span>
</span></span><span class="line"><span class="cl"> <span class="o">+</span> <span class="s2">&#34;-H &#39;Priority: high&#39; &#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">User</span> <span class="o">=</span> <span class="s2">&#34;root&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span></code></pre></div><p>Thanks for reading :)</p>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,41 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/bread-dough-for-lazy-boys/" />
<title>Bread dough for lazy boys - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/bread-dough-for-lazy-boys/" />
<title>Bread dough for lazy boys</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Bread dough for lazy boys</h2>
<div>
<p>January 22, 2023</p>
<article class="post">
<header>
<h1>Bread dough for lazy boys</h1>
<time>Jan 22, 2023</time>
<div class="tags">
<a href="/tags/cooking">cooking</a>
</div>
</header><h3 id="ingredienti">INGREDIENTI</h3>
</header>
<div class="content">
<h3 id="ingredienti">INGREDIENTI</h3>
<ul>
<li>flour (ideally bread flour but if you don&rsquo;t have it, it&rsquo;s not the end of the world)</li>
<li>water</li>
@ -69,16 +70,16 @@
<li><a href="https://www.youtube.com/watch?v=uWbl3Sr2y1Y">Kenji video</a></li>
<li><a href="https://www.youtube.com/watch?v=o4ABOKdHEUs">Ragusea pizza video</a></li>
</ul>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,86 +1,39 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/categories/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/categories/" />
<title>Categories - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/categories/" />
<title>Categories</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/categories/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,21 +2,99 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Categories on James&#39; Blog</title>
<link>https://nonsense.dymc.win/categories/</link>
<link>http://localhost:1313/categories/</link>
<description>Recent content in Categories on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<atom:link href="https://nonsense.dymc.win/categories/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -30,7 +108,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -45,10 +123,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -150,15 +228,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -241,12 +319,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -318,12 +407,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -373,10 +497,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -458,12 +582,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -529,10 +671,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -641,10 +783,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -738,12 +880,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -794,10 +947,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -854,10 +1007,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -946,10 +1099,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -992,10 +1145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1072,10 +1225,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1144,7 +1297,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1152,10 +1305,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1216,10 +1369,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1292,7 +1445,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1300,10 +1539,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1326,7 +1565,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1355,10 +1594,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1393,7 +1632,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1401,10 +1640,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1467,10 +1706,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1487,7 +1726,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1503,7 +1742,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1519,10 +1758,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -0,0 +1,59 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/" />
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article class="post">
<header>
<h1>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</h1>
<time>Jun 25, 2023</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
<a href="/tags/home-manager">home-manager</a>
</div>
</header>
<div class="content">
<h3 id="components">components</h3>
<ul>
<li>hyprland (window manager)</li>
<li>waybar (bar)</li>
<li>wofi (application launcher)</li>
<li>mako (notification daemon)</li>
</ul>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -4,6 +4,7 @@
/* define colors */
:root {
--bg: black;
--fg: white;
--bg: #111;
--fg: #eee;
--accent: #666;
}

View file

@ -5,5 +5,6 @@
/* define colors */
:root {
--bg: white;
--fg: black;
--fg: #1a1a1a;
--accent: #999;
}

View file

@ -6,76 +6,86 @@
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
line-height: 1.6;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
line-height: 1.7;
background-color: var(--bg);
color: var(--fg);
padding: 0 1rem;
/* layout */
max-width: 700px;
padding: 0 1.5rem;
max-width: 650px;
margin: 0 auto;
}
body a {
color: magenta;
a {
color: var(--fg);
text-decoration: underline;
text-decoration-color: var(--accent);
text-underline-offset: 3px;
}
body pre {
padding:1rem;
margin-bottom: 1rem;
a:hover {
text-decoration-color: var(--fg);
}
pre {
padding: 1rem;
margin: 1.5rem 0;
overflow-x: auto;
}
/* ===== Typography ===== */
h1, h2, h3, h4 {
line-height: 1.3;
font-weight: 600;
margin: 1.5rem 0 0.75rem;
font-weight: 500;
margin: 2rem 0 1rem;
line-height: 1.4;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
p {
margin-top: 1.3rem;
margin-bottom: 1.3rem;
margin: 1rem 0;
}
/* ===== Images ===== */
img {
max-width: 100%;
height: auto;
border-radius: 5px;
}
/* ===== Navigation ===== */
nav {
nav.navbar {
padding: 2rem 0;
display: flex;
/* justify-content: space-between; */
/* align-items: center; */
/* padding: 1rem 0; */
/* flex-wrap: wrap; */
gap: 1.5rem;
font-size: 1.3rem;
}
nav a {
margin-right: 1.5rem;
font-size: 3rem;
text-decoration: none;
color: var(--fg);
}
.home {
nav a:hover {
text-decoration: underline;
}
.toggle-button {
font-size: 3rem;
background: none;
border: none;
background-color: var(--bg);
cursor: pointer;
font-size: 1.2rem;
padding: 0;
}
/* ===== Search ===== */
#search {
width: 100%;
background-color: var(--bg);
background: transparent;
color: var(--fg);
border: 1px solid var(--fg);
padding: 1rem;
margin-bottom: 1.3rem;
padding: 0.75rem 1rem;
margin: 1rem 0;
font-size: 1rem;
}
#results li {
@ -83,37 +93,54 @@ nav a {
margin-bottom: 1rem;
}
/* archive tree */
/* ===== Featured Post ===== */
.featured {
margin-bottom: 3rem;
}
.featured h2 {
margin-top: 0;
}
.featured .date {
opacity: 0.6;
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
/* ===== Archive Tree ===== */
.tree, .tree ul {
list-style: none;
margin: 0;
position: relative;
padding-left: 1rem;
}
.tree ul {
margin-left: 0.5rem;
.tree > li {
margin: 0.5rem 0;
}
.tree li {
margin: 0;
padding: 0.25rem 0 0.25rem 1rem;
position: relative;
}
.tree li::before {
content: "";
position: absolute;
top: 0;
left: 0;
border-left: 1px solid var(--fg);
border-bottom: 1px solid var(--fg);
width: 1rem;
height: 1rem;
.tree .folder {
font-weight: 500;
}
.tree a {
text-decoration: none;
}
.tree a:hover {
text-decoration: underline;
}
/* ===== Footer ===== */
footer {
padding-bottom: 2rem;
margin-top: 4rem;
padding: 2rem 0;
opacity: 0.5;
font-size: 0.9rem;
}
/* ===== Responsive ===== */
@ -121,7 +148,4 @@ footer {
body {
padding: 0 2rem;
}
nav {
flex-wrap: nowrap;
}
}

417
public/css/style.css Normal file
View file

@ -0,0 +1,417 @@
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #ffffff;
--fg: #1a1a1a;
--fg-secondary: #666666;
--link: #1a1a1a;
--link-underline: #999999;
--border: #e5e5e5;
--code-bg: #f6f8fa;
}
/* Light syntax highlighting */
:root .chroma { color: #24292e; background-color: #f6f8fa; }
:root .chroma .err { color: #a00; }
:root .chroma .k { color: #d73a49; }
:root .chroma .kc { color: #005cc5; }
:root .chroma .kd { color: #d73a49; }
:root .chroma .kn { color: #d73a49; }
:root .chroma .kp { color: #d73a49; }
:root .chroma .kr { color: #6f42c1; }
:root .chroma .kt { color: #005cc5; }
:root .chroma .na { color: #6f42c1; }
:root .chroma .nc { color: #6f42c1; }
:root .chroma .no { color: #e36209; }
:root .chroma .nd { color: #6f42c1; }
:root .chroma .ne { color: #6f42c1; }
:root .chroma .nf { color: #6f42c1; }
:root .chroma .nl { color: #e36209; }
:root .chroma .nt { color: #22863a; }
:root .chroma .nx { color: #24292e; }
:root .chroma .s { color: #032f62; }
:root .chroma .sa { color: #032f62; }
:root .chroma .sb { color: #032f62; }
:root .chroma .sc { color: #032f62; }
:root .chroma .sd { color: #032f62; }
:root .chroma .s2 { color: #032f62; }
:root .chroma .se { color: #005cc5; }
:root .chroma .sh { color: #032f62; }
:root .chroma .si { color: #032f62; }
:root .chroma .sr { color: #032f62; }
:root .chroma .ss { color: #005cc5; }
:root .chroma .m { color: #005cc5; }
:root .chroma .mb { color: #005cc5; }
:root .chroma .mf { color: #005cc5; }
:root .chroma .mh { color: #005cc5; }
:root .chroma .mi { color: #005cc5; }
:root .chroma .il { color: #005cc5; }
:root .chroma .mo { color: #005cc5; }
:root .chroma .o { color: #e36209; }
:root .chroma .ow { color: #d73a49; }
:root .chroma .c { color: #6a737d; }
:root .chroma .ch { color: #6a737d; }
:root .chroma .cm { color: #6a737d; }
:root .chroma .c1 { color: #6a737d; }
:root .chroma .cs { color: #6a737d; }
:root .chroma .cp { color: #6a737d; }
:root .chroma .cpf { color: #6a737d; }
:root .chroma .gd { color: #b31d28; }
:root .chroma .ge { font-style: italic; }
:root .chroma .gi { color: #22863a; }
:root .chroma .gs { font-weight: bold; }
:root .chroma .gu { color: #6a737d; }
:root .chroma .ln { color: #6a737d; }
:root .chroma .lnt { color: #6a737d; }
[data-theme="dark"] {
--bg: #ffffff;
--fg: #1a1a1a;
--fg-secondary: #666666;
--link: #1a1a1a;
--link-underline: #999999;
--border: #e5e5e5;
--code-bg: #f5f5f5;
}
[data-theme="dark"] {
--bg: #111111;
--fg: #e5e5e5;
--fg-secondary: #999999;
--link: #e5e5e5;
--link-underline: #666666;
--border: #333333;
--code-bg: #1a1a1a;
}
/* Dark syntax highlighting */
[data-theme="dark"] .chroma { color: #f8f8f2; background-color: #272822; }
[data-theme="dark"] .chroma .err { color: #960050; background-color: #1e0010; }
[data-theme="dark"] .chroma .k { color: #66d9ef; }
[data-theme="dark"] .chroma .kc { color: #66d9ef; }
[data-theme="dark"] .chroma .kd { color: #66d9ef; }
[data-theme="dark"] .chroma .kn { color: #f92672; }
[data-theme="dark"] .chroma .kp { color: #66d9ef; }
[data-theme="dark"] .chroma .kr { color: #66d9ef; }
[data-theme="dark"] .chroma .kt { color: #66d9ef; }
[data-theme="dark"] .chroma .na { color: #a6e22e; }
[data-theme="dark"] .chroma .nc { color: #a6e22e; }
[data-theme="dark"] .chroma .no { color: #66d9ef; }
[data-theme="dark"] .chroma .nd { color: #a6e22e; }
[data-theme="dark"] .chroma .ne { color: #a6e22e; }
[data-theme="dark"] .chroma .nf { color: #a6e22e; }
[data-theme="dark"] .chroma .nt { color: #f92672; }
[data-theme="dark"] .chroma .l { color: #ae81ff; }
[data-theme="dark"] .chroma .ld { color: #e6db74; }
[data-theme="dark"] .chroma .s { color: #e6db74; }
[data-theme="dark"] .chroma .sa { color: #e6db74; }
[data-theme="dark"] .chroma .sb { color: #e6db74; }
[data-theme="dark"] .chroma .sc { color: #e6db74; }
[data-theme="dark"] .chroma .dl { color: #e6db74; }
[data-theme="dark"] .chroma .sd { color: #e6db74; }
[data-theme="dark"] .chroma .s2 { color: #e6db74; }
[data-theme="dark"] .chroma .se { color: #ae81ff; }
[data-theme="dark"] .chroma .sh { color: #e6db74; }
[data-theme="dark"] .chroma .si { color: #e6db74; }
[data-theme="dark"] .chroma .sr { color: #e6db74; }
[data-theme="dark"] .chroma .s1 { color: #e6db74; }
[data-theme="dark"] .chroma .ss { color: #ae81ff; }
[data-theme="dark"] .chroma .m { color: #ae81ff; }
[data-theme="dark"] .chroma .mb { color: #ae81ff; }
[data-theme="dark"] .chroma .mf { color: #ae81ff; }
[data-theme="dark"] .chroma .mh { color: #ae81ff; }
[data-theme="dark"] .chroma .mi { color: #ae81ff; }
[data-theme="dark"] .chroma .il { color: #ae81ff; }
[data-theme="dark"] .chroma .mo { color: #ae81ff; }
[data-theme="dark"] .chroma .o { color: #f92672; }
[data-theme="dark"] .chroma .ow { color: #f92672; }
[data-theme="dark"] .chroma .c { color: #75715e; }
[data-theme="dark"] .chroma .ch { color: #75715e; }
[data-theme="dark"] .chroma .cm { color: #75715e; }
[data-theme="dark"] .chroma .c1 { color: #75715e; }
[data-theme="dark"] .chroma .cs { color: #75715e; }
[data-theme="dark"] .chroma .cp { color: #75715e; }
[data-theme="dark"] .chroma .cpf { color: #75715e; }
[data-theme="dark"] .chroma .gd { color: #f92672; }
[data-theme="dark"] .chroma .ge { font-style: italic; }
[data-theme="dark"] .chroma .gi { color: #a6e22e; }
[data-theme="dark"] .chroma .gs { font-weight: bold; }
[data-theme="dark"] .chroma .gu { color: #75715e; }
html {
font-size: 16px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: var(--bg);
color: var(--fg);
line-height: 1.6;
max-width: 680px;
margin: 0 auto;
padding: 0 1.25rem;
}
a {
color: var(--link);
text-decoration: underline;
text-decoration-color: var(--link-underline);
text-underline-offset: 3px;
}
a:hover {
text-decoration-color: var(--link);
}
/* Header */
.site-header {
padding: 2rem 0;
}
.site-header nav {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.site-header .home {
font-weight: 600;
font-size: 1.1rem;
text-decoration: none;
}
.nav-links {
display: flex;
align-items: center;
gap: 1rem;
}
.nav-links a {
text-decoration: none;
font-size: 0.95rem;
}
#theme-toggle {
background: none;
border: none;
cursor: pointer;
font-size: 1.1rem;
color: var(--fg);
padding: 0;
}
/* Main */
main {
padding-bottom: 3rem;
}
h1, h2, h3 {
font-weight: 500;
line-height: 1.3;
margin: 2rem 0 1rem;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; margin-top: 2.5rem; }
h3 { font-size: 1.1rem; }
p {
margin: 1rem 0;
}
/* Intro */
.intro {
margin-bottom: 2rem;
}
.intro p {
font-size: 1.1rem;
}
/* Featured Post */
.featured {
margin-bottom: 2.5rem;
}
.post-preview h3 {
margin: 0 0 0.25rem;
}
.post-preview time {
font-size: 0.85rem;
color: var(--fg-secondary);
}
.post-preview p {
margin-top: 0.5rem;
}
/* Archive */
.archive .year-list {
list-style: none;
}
.archive .year-list > li {
margin-bottom: 1.5rem;
}
.archive .year {
font-weight: 500;
}
.post-list {
list-style: none;
margin-top: 0.5rem;
}
.post-list li {
display: flex;
gap: 1rem;
padding: 0.25rem 0;
}
.post-list time {
color: var(--fg-secondary);
font-size: 0.9rem;
min-width: 5rem;
}
/* Post */
.post header {
margin-bottom: 2rem;
}
.post header h1 {
margin-bottom: 0.5rem;
}
.post header time {
color: var(--fg-secondary);
font-size: 0.9rem;
}
.post .tags {
margin-top: 0.75rem;
}
.post .tags a {
margin-right: 0.75rem;
font-size: 0.85rem;
color: var(--fg-secondary);
}
.post .content {
margin-top: 2rem;
}
.post .content p {
margin: 1.25rem 0;
}
.post .content img {
max-width: 100%;
height: auto;
margin: 1.5rem 0;
}
.post .content pre {
background: var(--code-bg);
padding: 1rem;
overflow-x: auto;
margin: 1.5rem 0;
font-size: 0.9rem;
}
.post .content code {
background: var(--code-bg);
padding: 0.15rem 0.3rem;
font-size: 0.9rem;
}
.post .content pre code {
background: none;
padding: 0;
}
.post .content ul, .post .content ol {
margin: 1rem 0;
padding-left: 1.5rem;
}
.post .content li {
margin: 0.5rem 0;
}
.post .content blockquote {
border-left: 3px solid var(--border);
padding-left: 1rem;
margin: 1.5rem 0;
color: var(--fg-secondary);
}
/* Search */
#search {
width: 100%;
padding: 0.75rem 1rem;
font-size: 1rem;
background: transparent;
color: var(--fg);
border: 1px solid var(--fg-secondary);
margin-bottom: 1.5rem;
}
#results {
list-style: none;
margin-bottom: 2rem;
}
#results li {
margin-bottom: 1rem;
}
#results a {
font-weight: 500;
}
/* Tags */
.tag-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem 0;
margin-top: 1rem;
}
.tag-list .sep {
color: var(--fg-secondary);
margin: 0 0.25rem;
}
/* Footer */
.site-footer {
padding: 2rem 0;
text-align: center;
font-size: 0.85rem;
color: var(--fg-secondary);
}
.site-footer a {
color: var(--fg-secondary);
}
/* Responsive */
@media (max-width: 480px) {
.post-list li {
flex-direction: column;
gap: 0.25rem;
}
.post-list time {
min-width: auto;
}
}

View file

@ -1,40 +1,43 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/" />
<title>Declarative firefox config with home-manager on nixos - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/" />
<title>Declarative firefox config with home-manager on nixos</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Declarative firefox config with home-manager on nixos</h2>
<div>
<p>October 2, 2022</p>
<article class="post">
<header>
<h1>Declarative firefox config with home-manager on nixos</h1>
<time>Oct 2, 2022</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
<a href="/tags/home-manager">home-manager</a>
</div>
</header><p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
</header>
<div class="content">
<p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber&rsquo;s templates to be very helpful.</p>
<p>First of all you&rsquo;ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
<h3 id="extensions">EXTENSIONS</h3>
<p>This will require having the NUR (nix user repo) enabled. But once you do, you can configure any extension you want to be auto installed with something like this:</p>
@ -89,16 +92,16 @@
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span>
</span></span></code></pre></div><p>Of course I am sure there are many more exciting things that could be done here but this is as far as I have got. For all avilable options you can check out <a href="https://nix-community.github.io/home-manager/options.html">this</a> or alternatively run a <code>man home-configuration.nix</code>. Hope this has been helpful :)</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,41 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/" />
<title>Get the thoughts out of your head and into a digital format with this python journalling script - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/" />
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Get the thoughts out of your head and into a digital format with this python journalling script</h2>
<div>
<p>December 1, 2022</p>
<article class="post">
<header>
<h1>Get the thoughts out of your head and into a digital format with this python journalling script</h1>
<time>Dec 1, 2022</time>
<div class="tags">
<a href="/tags/python">python</a>
</div>
</header><p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
</header>
<div class="content">
<p>Since getting going with emacs I&rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&rsquo;m doing something with my text editor makes it a lot more palletable.</p>
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&rsquo;s features but allow you to use whatever editor you like with markdown.</p>
<h3 id="whats-the-time">WHAT&rsquo;S THE TIME?</h3>
<p>First things first, I wrote this little function that would give you a formatted version of your local time. This will be important as a lot of this comes down to dates and times really. It uses python&rsquo;s time module:</p>
@ -87,16 +88,16 @@
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">main</span><span class="p">()</span>
</span></span></code></pre></div><p>As simple as it is, it works reasonalby well as it stands. I would though like to add the ability to customise the file format you want to use so you could have org, plain text, markdown, or whatever. I&rsquo;ve got the script set to just run with a keybinding at the moment so it fulfils the immediacy I was enjoying with org-journal. You can find the script <a href="https://gitlab.com/robbygozzarder/py">here</a> atm. BYEBYE xxx</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,43 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/" />
<title>Handy script for a more zen twitch experience - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/" />
<title>Handy script for a more zen twitch experience</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Handy script for a more zen twitch experience</h2>
<div>
<p>August 13, 2025</p>
<article class="post">
<header>
<h1>Handy script for a more zen twitch experience</h1>
<time>Aug 13, 2025</time>
<div class="tags">
<a href="/tags/bash">bash</a>
<a href="/tags/twitch">twitch</a>
</div>
</header><p>I like to watch twitch streams.
</header>
<div class="content">
<p>I like to watch twitch streams.
Watching them in the browser at <code>twitch.tv</code> is generally not an experience which sparks joy though.
I&rsquo;m buffering.
I&rsquo;m declining cookies.
@ -128,16 +131,16 @@ Here it is:</p>
<li>takes a second to talk to the internet so things don&rsquo;t launch immediately</li>
<li>have to faff with getting api key - <a href="https://dev.twitch.tv/docs/api/get-started/">how to get one btw</a></li>
</ul>
<p>Hope you enjoyed bye</p></article>
</main>
<footer id="footer">
<p>Hope you enjoyed bye</p>
</div>
</article>
</main><footer class="site-footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -1,107 +1,222 @@
<!doctype html>
<html lang="en"><head>
<meta name="generator" content="Hugo 0.155.3">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<meta name="generator" content="Hugo 0.155.3"><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/" />
<title>James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/" />
<title>James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<section class="intro">
<p>This is a place to document bits and bobs I've been up to that have interested me. Expect linux and self-hosting tinkering, some novice programming, and maybe the occasional recipe. I tend to be a fool so take anything written here with a pinch of salt :)</p>
</section>
<article>
<h2><a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a></h2>
<p>Feb 13, 2026</p>
<p><h3 id="things-i-enjoyed">Things I enjoyed</h3>
<ul>
<li>Though not particularly &lsquo;dark skinned&rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.</li>
<li>An unashamed fanfic quality which I found amusing.
It honestly felt as if it had been dreamt up by a horny teenager on tumblr at points.</li>
</ul>
<h3 id="things-i-didnt-enjoy">Things I didn&rsquo;t enjoy</h3>
<ul>
<li>The whole thing had a music video gloss which made the landscape feel incidental.
It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&rsquo;t seem to get muddy.
This was a problem for me.</li>
<li>Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&rsquo;s a film about the enduring power of passionate undying love this was also a major problem.</li>
</ul>
<h3 id="things-that-intrigued-me">Things that intrigued me</h3>
<ul>
<li>Jacob Elordi doing the same accent as Christian Bale in The Prestige.</li>
</ul>
<h3 id="verdict">Verdict</h3>
<p>48 heaving bosoms out of 100</p></p>
</article>
<article>
<h2><a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a></h2>
<p>Aug 13, 2025</p>
<p><p>I like to watch twitch streams.
Watching them in the browser at <code>twitch.tv</code> is generally not an experience which sparks joy though.
I&rsquo;m buffering.
I&rsquo;m declining cookies.
I&rsquo;m getting spammed with notifications to claim a sick new overwatch skin.
There&rsquo;s a little channel point button twerking for me to click it.
You get the idea; it&rsquo;s a heavy noisy experience.</p></p>
</article>
<article>
<h2><a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a></h2>
<p>Aug 11, 2025</p>
<p><p>As is traditional with people hosting their own blog I&rsquo;m going to do a post detailing EXACTLY how I&rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.</p></p>
</article>
<article>
<h2><a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a></h2>
<p>Apr 6, 2024</p>
<p><p>I&rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
Beyond that, the thing I found most useful was simply reading the source of some popular plugins to get an idea of how things worked.
I would recommend sticking to plugins with a smaller scope though.</p></p>
</article>
<article>
<h2><a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a></h2>
<p>Aug 18, 2023</p>
<p><p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p></p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<section class="archive">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<ul class="year-list">
<li>
<span class="year">2026</span>
<ul class="post-list">
<li>
<time>Feb 16</time>
<a href="/backing-up-nixos-state-with-restic/">Backing up nixos state with restic</a>
</li>
<li>
<time>Feb 13</time>
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
</li>
</ul>
</li>
<li>
<span class="year">2025</span>
<ul class="post-list">
<li>
<time>Aug 13</time>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
</li>
<li>
<time>Aug 11</time>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
</li>
</ul>
</li>
<li>
<span class="year">2024</span>
<ul class="post-list">
<li>
<time>Jun 25</time>
<a href="/adventures-in-running-headscale-on-nixos/">adventures in running headscale on nixos</a>
</li>
<li>
<time>Apr 6</time>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
</li>
</ul>
</li>
<li>
<span class="year">2023</span>
<ul class="post-list">
<li>
<time>Sep 12</time>
<a href="/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/">nginx reverse-proxy with SSL for services running on tailscale!</a>
</li>
<li>
<time>Aug 18</time>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
<li>
<time>Jun 26</time>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
</li>
<li>
<time>Jun 25</time>
<a href="/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/">configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</a>
</li>
<li>
<time>May 16</time>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
<li>
<time>Apr 3</time>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
</li>
<li>
<time>Mar 13</time>
<a href="/placeholder/">placeholder</a>
</li>
<li>
<time>Mar 13</time>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
</li>
<li>
<time>Feb 28</time>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
</li>
<li>
<time>Jan 29</time>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
</li>
<li>
<time>Jan 24</time>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
</li>
<li>
<time>Jan 22</time>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
</li>
</ul>
</li>
<li>
<span class="year">2022</span>
<ul class="post-list">
<li>
<time>Dec 20</time>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<time>Dec 10</time>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
</li>
<li>
<time>Dec 1</time>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
</li>
<li>
<time>Nov 18</time>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
</li>
<li>
<time>Nov 10</time>
<a href="/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a>
</li>
<li>
<time>Nov 8</time>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
</li>
<li>
<time>Oct 26</time>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
</li>
<li>
<time>Oct 2</time>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
</li>
<li>
<time>Sep 23</time>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
</li>
<li>
<time>Sep 13</time>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</li>
</ul>
</li>
</ul>
</section>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,51 +1,48 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/info/" />
<title> - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/info/" />
<title></title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2></h2>
<div></div>
</header><p>This is a place to document bits and bobs I&rsquo;ve been up to that have interested me.
<article class="post">
<header>
<h1></h1>
<time>Jan 1, 0001</time>
</header>
<div class="content">
<p>This is a place to document bits and bobs I&rsquo;ve been up to that have interested me.
Expect linux and self-hosting tinkering, some novice programming, and maybe the occasional recipe.
I tend to be a fool so take anything written here with a pinch of salt :)</p>
<p><a href="../index.xml">rss feed here!</a></p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

37
public/js/script.js Normal file
View file

@ -0,0 +1,37 @@
// Simple Search
const searchInput = document.getElementById('search');
const results = document.getElementById('results');
if (searchInput && results) {
const posts = [
{{ range $index, $page := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ if $index }},{{ end }}
{
title: "{{ $page.Title | safeJS }}",
url: "{{ $page.RelPermalink }}",
content: {{ $page.Plain | safeJS | jsonify }}
}
{{ end }}
];
searchInput.addEventListener('input', (e) => {
const query = e.target.value.toLowerCase();
results.innerHTML = '';
if (query.length < 2) return;
const matches = posts.filter(post => {
return post.title.toLowerCase().includes(query) ||
post.content.toLowerCase().includes(query);
});
matches.forEach(post => {
const li = document.createElement('li');
const a = document.createElement('a');
a.href = post.url;
a.textContent = post.title;
li.appendChild(a);
results.appendChild(li);
});
});
}

View file

@ -1,40 +1,43 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/learning-about-qtile-widgets-with-cricket/" />
<title>Learning about qtile widgets with cricket - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/" />
<title>Learning about qtile widgets with cricket</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Learning about qtile widgets with cricket</h2>
<div>
<p>April 3, 2023</p>
<article class="post">
<header>
<h1>Learning about qtile widgets with cricket</h1>
<time>Apr 3, 2023</time>
<div class="tags">
<a href="/tags/qtile">qtile</a>
<a href="/tags/python">python</a>
</div>
</header><p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
</header>
<div class="content">
<p>I&rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&rsquo;m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
<p>As far as I can tell from looking at the code for some of the <a href="https://github.com/qtile/qtile/tree/master/libqtile/widget">built-in widgets</a> and <a href="https://docs.qtile.org/en/latest/manual/howto/widget.html">this very helpful guide</a>, a basic hello world widget would look something like this.</p>
@ -135,16 +138,16 @@
</span></span><span class="line"><span class="cl"> <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">]</span>
</span></span></code></pre></div><p>Happy widget writing.</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,41 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/" />
<title>Lowkey emacs setup bits and bobs - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/" />
<title>Lowkey emacs setup bits and bobs</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Lowkey emacs setup bits and bobs</h2>
<div>
<p>November 18, 2022</p>
<article class="post">
<header>
<h1>Lowkey emacs setup bits and bobs</h1>
<time>Nov 18, 2022</time>
<div class="tags">
<a href="/tags/emacs">emacs</a>
</div>
</header><p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
</header>
<div class="content">
<p>About a month ago I was a little bored and thought I&rsquo;d give emacs a go. There&rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&rsquo;s also the quite jarring default theme which wasn&rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&rsquo;ve landed on a simple little setup that I&rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
<p>First things first, assuming you&rsquo;re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nv">load-theme</span> <span class="ss">&#39;misterioso</span> <span class="no">t</span><span class="p">)</span>
@ -107,16 +108,16 @@
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">&#34;M-c&#34;</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
</span></span></code></pre></div><p>Here&rsquo;s a little pic of the current setup :)</p>
<p><img src="/image/emacs.png" alt="emacs"></p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,47 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/making-nix-colors-talk-to-neovim/" />
<title>Making nix-colors talk to neovim - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/" />
<title>Making nix-colors talk to neovim</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Making nix-colors talk to neovim</h2>
<div>
<p>August 18, 2023</p>
<article class="post">
<header>
<h1>Making nix-colors talk to neovim</h1>
<time>Aug 18, 2023</time>
<div class="tags">
<a href="/tags/nix-colors">nix-colors</a>
<a href="/tags/neovim">neovim</a>
<a href="/tags/nixos">nixos</a>
<a href="/tags/home-manager">home-manager</a>
</div>
</header><p>I recently started fiddling around with home-managerifying my neovim config.
</header>
<div class="content">
<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
<p>Beneath is a little snippet of how you could make it all happen.</p>
@ -76,16 +83,16 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">];</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><p>Happy theming!</p></article>
</main>
<footer id="footer">
</span></span></code></pre></div><p>Happy theming!</p>
</div>
</article>
</main><footer class="site-footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -1,40 +1,47 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/multi-user-qtile-fiddling/" />
<title>Multi user qtile fiddling - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/multi-user-qtile-fiddling/" />
<title>Multi user qtile fiddling</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Multi user qtile fiddling</h2>
<div>
<p>December 20, 2022</p>
<article class="post">
<header>
<h1>Multi user qtile fiddling</h1>
<time>Dec 20, 2022</time>
<div class="tags">
<a href="/tags/qtile">qtile</a>
<a href="/tags/python">python</a>
<a href="/tags/nixos">nixos</a>
<a href="/tags/home-manager">home-manager</a>
</div>
</header><p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
</header>
<div class="content">
<p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
<p>I basically just want the config to work out which computer it&rsquo;&rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">if</span> <span class="n">socket</span><span class="o">.</span><span class="n">gethostname</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;baron&#39;</span><span class="p">:</span>
@ -103,16 +110,16 @@
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">processes</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
</span></span></code></pre></div><p>Of course, there are many ways that this could all be achievd but I think it&rsquo;s quite neat having it all in my one qtile config. That&rsquo;s about it for today. lots of love x</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -0,0 +1,76 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/" />
<title>nginx reverse-proxy with SSL for services running on tailscale! - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article class="post">
<header>
<h1>nginx reverse-proxy with SSL for services running on tailscale!</h1>
<time>Sep 12, 2023</time>
<div class="tags">
<a href="/tags/tailscale">tailscale</a>
<a href="/tags/nixos">nixos</a>
</div>
</header>
<div class="content">
<p>So you&rsquo;re running something on a server somewhere. For whatever reason you cant or don&rsquo;t want to expose ports 80 and 443 to the outside world.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="cl"><span class="n">services</span><span class="o">.</span><span class="n">jellyfin</span><span class="o">.</span><span class="n">enable</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">security</span><span class="o">.</span><span class="n">acme</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">acceptTerms</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">defaults</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">email</span> <span class="o">=</span> <span class="s2">&#34;barry@email.com&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">dnsProvider</span> <span class="o">=</span> <span class="s2">&#34;cloudflare&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">credentialsFile</span> <span class="o">=</span> <span class="s2">&#34;/etc/credentials.env&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">services</span><span class="o">.</span><span class="n">nginx</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">enable</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">virtualHosts</span><span class="o">.</span><span class="s2">&#34;example.com&#34;</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">enableACME</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">acmeRoot</span> <span class="o">=</span> <span class="no">null</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">addSSL</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">locations</span><span class="o">.</span><span class="s2">&#34;/&#34;</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="n">proxyPass</span> <span class="o">=</span> <span class="s2">&#34;http://127.0.0.1:8096&#34;</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="n">proxyWebsockets</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"> <span class="p">};</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span>
</span></span></code></pre></div>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,41 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/over-engineered-nixos-blog-deployment-setup/" />
<title>Over-engineered (?) nixos blog deployment setup - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/" />
<title>Over-engineered (?) nixos blog deployment setup</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Over-engineered (?) nixos blog deployment setup</h2>
<div>
<p>August 11, 2025</p>
<article class="post">
<header>
<h1>Over-engineered (?) nixos blog deployment setup</h1>
<time>Aug 11, 2025</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
</div>
</header><p>As is traditional with people hosting their own blog I&rsquo;m going to do a post detailing EXACTLY how I&rsquo;m hosting my blog.
</header>
<div class="content">
<p>As is traditional with people hosting their own blog I&rsquo;m going to do a post detailing EXACTLY how I&rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.</p>
<p>Here is a diagram I edited to illustrate (credit to xkcd I think?).</p>
@ -116,16 +117,16 @@ That&rsquo;s the directory of the git repo that the website source lives.</p>
<li>Update the <code>rev</code> and <code>sha256</code> to the new commit (this is annoying and I&rsquo;m trying to work out a good way to automate it)</li>
<li>Rebuild vps from laptop</li>
</ul>
<p>Not necessarily faster than the old rsync method but it&rsquo;s pretty damn declarative, that&rsquo;s for sure.</p></article>
</main>
<footer id="footer">
<p>Not necessarily faster than the old rsync method but it&rsquo;s pretty damn declarative, that&rsquo;s for sure.</p>
</div>
</article>
</main><footer class="site-footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -0,0 +1,52 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/placeholder/" />
<title>placeholder - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article class="post">
<header>
<h1>placeholder</h1>
<time>Mar 13, 2023</time>
<div class="tags">
<a href="/tags/thing">thing</a>
<a href="/tags/wotsit">wotsit</a>
</div>
</header>
<div class="content">
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,86 +1,216 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/posts/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/posts/" />
<title>Posts - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/posts/" />
<title>Posts</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/posts/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<main id="content">
<h1>Posts</h1>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<ul class="year-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<span class="year">2026</span>
<ul class="post-list">
<li>
<time>Feb 16</time>
<a href="/backing-up-nixos-state-with-restic/">Backing up nixos state with restic</a>
</li>
<li>
<time>Feb 13</time>
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
</li>
</ul>
</li>
<li>
<span class="year">2025</span>
<ul class="post-list">
<li>
<time>Aug 13</time>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
</li>
<li>
<time>Aug 11</time>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
</li>
</ul>
</li>
<li>
<span class="year">2024</span>
<ul class="post-list">
<li>
<time>Jun 25</time>
<a href="/adventures-in-running-headscale-on-nixos/">adventures in running headscale on nixos</a>
</li>
<li>
<time>Apr 6</time>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
</li>
</ul>
</li>
<li>
<span class="year">2023</span>
<ul class="post-list">
<li>
<time>Sep 12</time>
<a href="/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/">nginx reverse-proxy with SSL for services running on tailscale!</a>
</li>
<li>
<time>Aug 18</time>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
<li>
<time>Jun 26</time>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
</li>
<li>
<time>Jun 25</time>
<a href="/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/">configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</a>
</li>
<li>
<time>May 16</time>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
<li>
<time>Apr 3</time>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
</li>
<li>
<time>Mar 13</time>
<a href="/placeholder/">placeholder</a>
</li>
<li>
<time>Mar 13</time>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
</li>
<li>
<time>Feb 28</time>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
</li>
<li>
<time>Jan 29</time>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
</li>
<li>
<time>Jan 24</time>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
</li>
<li>
<time>Jan 22</time>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
</li>
</ul>
</li>
<li>
<span class="year">2022</span>
<ul class="post-list">
<li>
<time>Dec 20</time>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<time>Dec 10</time>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
</li>
<li>
<time>Dec 1</time>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
</li>
<li>
<time>Nov 18</time>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
</li>
<li>
<time>Nov 10</time>
<a href="/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a>
</li>
<li>
<time>Nov 8</time>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
</li>
<li>
<time>Oct 26</time>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
</li>
<li>
<time>Oct 2</time>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
</li>
<li>
<time>Sep 23</time>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
</li>
<li>
<time>Sep 13</time>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</li>
</ul>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Posts on James&#39; Blog</title>
<link>https://nonsense.dymc.win/posts/</link>
<link>http://localhost:1313/posts/</link>
<description>Recent content in Posts on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Fri, 13 Feb 2026 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Mon, 16 Feb 2026 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/posts/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,40 +1,41 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/python-podcast-scripting/" />
<title>Python podcast scripting - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/python-podcast-scripting/" />
<title>Python podcast scripting</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Python podcast scripting</h2>
<div>
<p>January 24, 2023</p>
<article class="post">
<header>
<h1>Python podcast scripting</h1>
<time>Jan 24, 2023</time>
<div class="tags">
<a href="/tags/python">python</a>
</div>
</header><p>I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
</header>
<div class="content">
<p>I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &lsquo;podcast-player-hopping&rsquo; without success for the last couple of months trying to find something which doesn&rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
<ul>
<li>write python script to download podcasts</li>
<li>set up cron job on my server to run script every couple of hours</li>
@ -115,16 +116,16 @@
</span></span><span class="line"><span class="cl"><span class="n">download</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">trim</span><span class="p">()</span>
</span></span></code></pre></div><p>Of course this slightly ramshackle approach is certainly not for everyone lol but as it stands it&rsquo;s working quite nicely for me. Lots of love and happy listening :)</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,43 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/rudimentary-local-scrobbling-with-bash/" />
<title>Rudimentary local scrobbling with bash - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/" />
<title>Rudimentary local scrobbling with bash</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Rudimentary local scrobbling with bash</h2>
<div>
<p>September 13, 2022</p>
<article class="post">
<header>
<h1>Rudimentary local scrobbling with bash</h1>
<time>Sep 13, 2022</time>
<div class="tags">
<a href="/tags/music">music</a>
<a href="/tags/bash">bash</a>
</div>
</header><p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
</header>
<div class="content">
<p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&rsquo;ll be talking specifically about my setup for recording the albums I&rsquo;ve been listening to.</p>
<h3 id="lets-get-down-to-business">LET&rsquo;S GET DOWN TO BUSINESS</h3>
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&rsquo;m playing the classic album Lemonade by Beyonce it would look like this:</p>
<p><code>/home/randy/music/Beyonce/Lemonade/</code></p>
@ -57,16 +60,16 @@
</span></span><span class="line"><span class="cl"> <span class="k">done</span>
</span></span></code></pre></div><p>So these are just a few examples; the real point is once you have that file of three columns the world is your oyster. You could probably even use something a little less cumbersome such as python.</p>
<p>Finally, disclaimer: I am a bash amateur so I hope nothing you&rsquo;ve seen here was too upsetting. Lots of love x</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,284 +1,177 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/search/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/search/" />
<title> - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/search/" />
<title></title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/search/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<h1>Search</h1>
<p>Search posts by keyword.</p>
<p>This is not a very clever search. It simply looks if the content of a post contains your query. </p>
<input type="text" id="search" placeholder="🔎 leaf through the archive"/>
<input type="text" id="search" placeholder="Search..." />
<ul id="results"></ul>
<p>Alternatively, this is everything.</p>
<section class="tags">
<h2>Tags</h2>
<div class="tag-list">
<a href="/tags/nixos">nixos</a>
<span class="sep">·</span>
<a href="/tags/python">python</a>
<span class="sep">·</span>
<a href="/tags/home-manager">home-manager</a>
<span class="sep">·</span>
<a href="/tags/bash">bash</a>
<span class="sep">·</span>
<a href="/tags/qtile">qtile</a>
<span class="sep">·</span>
<a href="/tags/chess">chess</a>
<span class="sep">·</span>
<a href="/tags/neovim">neovim</a>
<span class="sep">·</span>
<a href="/tags/nix-colors">nix-colors</a>
<span class="sep">·</span>
<a href="/tags/tailscale">tailscale</a>
<span class="sep">·</span>
<a href="/tags/caddy">caddy</a>
<span class="sep">·</span>
<a href="/tags/cooking">cooking</a>
<span class="sep">·</span>
<a href="/tags/css">css</a>
<span class="sep">·</span>
<a href="/tags/docker">docker</a>
<span class="sep">·</span>
<a href="/tags/emacs">emacs</a>
<span class="sep">·</span>
<a href="/tags/film">film</a>
<span class="sep">·</span>
<a href="/tags/hugo">hugo</a>
<span class="sep">·</span>
<a href="/tags/javascript">javascript</a>
<span class="sep">·</span>
<a href="/tags/lua">lua</a>
<span class="sep">·</span>
<a href="/tags/music">music</a>
<span class="sep">·</span>
<a href="/tags/podman">podman</a>
<span class="sep">·</span>
<a href="/tags/restic">restic</a>
<span class="sep">·</span>
<a href="/tags/self-hosting">self-hosting</a>
<span class="sep">·</span>
<a href="/tags/thing">thing</a>
<span class="sep">·</span>
<a href="/tags/twitch">twitch</a>
<span class="sep">·</span>
<a href="/tags/wotsit">wotsit</a>
</div>
</section>
<ul class="tree">
<li>
<span class="folder">2026</span>
<ul>
<li>
<span class="folder">February</span>
<ul>
<li>
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<span class="folder">2025</span>
<ul>
<li>
<span class="folder">August</span>
<ul>
<li>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
</li>
<li>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<span class="folder">2024</span>
<ul>
<li>
<span class="folder">April</span>
<ul>
<li>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<span class="folder">2023</span>
<ul>
<li>
<span class="folder">August</span>
<ul>
<li>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
</ul>
</li>
<li>
<span class="folder">June</span>
<ul>
<li>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
</li>
</ul>
</li>
<li>
<span class="folder">May</span>
<ul>
<li>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
</ul>
</li>
<li>
<span class="folder">April</span>
<ul>
<li>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
</li>
</ul>
</li>
<li>
<span class="folder">March</span>
<ul>
<li>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
</li>
</ul>
</li>
<li>
<span class="folder">February</span>
<ul>
<li>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
</li>
</ul>
</li>
<li>
<span class="folder">January</span>
<ul>
<li>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
</li>
<li>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
</li>
<li>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<span class="folder">2022</span>
<ul>
<li>
<span class="folder">December</span>
<ul>
<li>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
</li>
<li>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
</li>
</ul>
</li>
<li>
<span class="folder">November</span>
<ul>
<li>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
</li>
<li>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
</li>
</ul>
</li>
<li>
<span class="folder">October</span>
<ul>
<li>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
</li>
<li>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
</li>
</ul>
</li>
<li>
<span class="folder">September</span>
<ul>
<li>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
</li>
<li>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</main>
<footer id="footer">
</main><footer class="site-footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,21 +2,99 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>James&#39; Blog</title>
<link>https://nonsense.dymc.win/search/</link>
<link>http://localhost:1313/search/</link>
<description>Recent content on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<atom:link href="https://nonsense.dymc.win/search/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/search/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -30,7 +108,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -45,10 +123,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -150,15 +228,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -241,12 +319,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -318,12 +407,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -373,10 +497,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -458,12 +582,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -529,10 +671,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -641,10 +783,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -738,12 +880,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -794,10 +947,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -854,10 +1007,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -946,10 +1099,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -992,10 +1145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1072,10 +1225,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1144,7 +1297,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1152,10 +1305,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1216,10 +1369,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1292,7 +1445,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1300,10 +1539,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1326,7 +1565,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1355,10 +1594,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1393,7 +1632,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1401,10 +1640,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1467,10 +1706,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1487,7 +1726,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1503,7 +1742,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1519,10 +1758,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -0,0 +1,125 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/" />
<title>setting up a lean mean hugo blogging theme - James&#39; Blog</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article class="post">
<header>
<h1>setting up a lean mean hugo blogging theme</h1>
<time>Nov 10, 2022</time>
<div class="tags">
<a href="/tags/hugo">hugo</a>
</div>
</header>
<div class="content">
<p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&rsquo;ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you&rsquo;ve got a selection of mostly empty directories looking something like this.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── archetypes
</span></span><span class="line"><span class="cl">│   └── default.md
</span></span><span class="line"><span class="cl">├── config.toml
</span></span><span class="line"><span class="cl">├── content
</span></span><span class="line"><span class="cl">├── data
</span></span><span class="line"><span class="cl">├── layouts
</span></span><span class="line"><span class="cl">├── public
</span></span><span class="line"><span class="cl">├── static
</span></span><span class="line"><span class="cl">└── themes
</span></span></code></pre></div><p>Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend <a href="https://github.com/ericmurphyxyz/hugo-starter-theme">this</a> guy which I used to get up and running. You could also check out <a href="https://gitlab.com/robbygozzarder/mcl">my theme</a> which I&rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&rsquo;ve got a theme with (I&rsquo;m using mine as an example) <code>git clone https://gitlab.com/robbygozzarder/mcl</code> and placed it in the themes directory you&rsquo;ll need to adjust your config.toml file to point it to this theme.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">theme</span><span class="p">=</span><span class="s2">&#34;mcl&#34;</span>
</span></span></code></pre></div><p>The directory structure of your new theme will look something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">└── mcl
</span></span><span class="line"><span class="cl"> ├── archetypes
</span></span><span class="line"><span class="cl"> │   └── default.md
</span></span><span class="line"><span class="cl"> ├── layouts
</span></span><span class="line"><span class="cl"> │   ├── 404.html
</span></span><span class="line"><span class="cl"> │   ├── _default
</span></span><span class="line"><span class="cl"> │   │   ├── list.html
</span></span><span class="line"><span class="cl"> │   │   └── single.html
</span></span><span class="line"><span class="cl"> │   ├── index.html
</span></span><span class="line"><span class="cl"> │   └── partials
</span></span><span class="line"><span class="cl"> │   ├── footer.html
</span></span><span class="line"><span class="cl"> │   ├── header.html
</span></span><span class="line"><span class="cl"> │   └── nav.html
</span></span><span class="line"><span class="cl"> ├── README.md
</span></span><span class="line"><span class="cl"> └── static
</span></span><span class="line"><span class="cl"> └── css
</span></span><span class="line"><span class="cl"> └── style.css
</span></span></code></pre></div><p>This is where most of the magic happens:</p>
<ul>
<li>The default.md file in the archetypes directory dictates what template to follow when adding new post files.</li>
<li>The layouts directory is where most of the meat is:
<ul>
<li>Firstly, there&rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)</li>
<li>Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.</li>
<li>Partials also contains index.html which (you guessed it!) is your home page.</li>
</ul>
</li>
<li>Last but not least, there&rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).</li>
</ul>
<p>Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:</p>
<ul>
<li>Content is where you put your posts - these are just markdown files which hugo converts to html for you.</li>
<li>Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl</li>
<li>Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.</li>
</ul>
<p>Now we&rsquo;ve got the directory what&rsquo;s happening where admin out the way let&rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl">{{ partial &#34;header.html&#34; . }}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>This is mainly a place for me to document various
</span></span><span class="line"><span class="cl">bits and bobs I&#39;ve been doing on my computers.
</span></span><span class="line"><span class="cl">I am a noob in most things so take anything written
</span></span><span class="line"><span class="cl">here with a pinch of salt. Lots of love :)<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">{{ .Content }}
</span></span><span class="line"><span class="cl">{{ range .Site.RegularPages | first 5 }}
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;{{ .RelPermalink }}&#34;</span><span class="p">&gt;</span>{{ .Title }}<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"> {{ .Summary }}
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">br</span><span class="p">&gt;&lt;</span><span class="nt">br</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"> {{ .Date.Format &#34;06 Jan, 2006&#34; }} |
</span></span><span class="line"><span class="cl"> {{ .WordCount }} words |
</span></span><span class="line"><span class="cl"> {{ .ReadingTime }} mins |
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> {{ range (.GetTerms &#34;tags&#34;) }}
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&#39;{{ .Permalink }}&#39;</span><span class="p">&gt;</span>{{ .LinkTitle }}<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"> {{ end }}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">{{ end }}
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">{{ partial &#34;footer.html&#34; . }}
</span></span></code></pre></div><p>In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs <a href="https://gohugo.io/templates/introduction">here</a>.</p>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,40 +1,41 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/simple-nixos-config-for-vps-static-site/" />
<title>Simple nixos config for vps static site - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/" />
<title>Simple nixos config for vps static site</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>Simple nixos config for vps static site</h2>
<div>
<p>January 29, 2023</p>
<article class="post">
<header>
<h1>Simple nixos config for vps static site</h1>
<time>Jan 29, 2023</time>
<div class="tags">
<a href="/tags/nixos">nixos</a>
</div>
</header><p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
</header>
<div class="content">
<p>Setting up a little static site is something I&rsquo;ve done a few different times on a few different operating systems. It&rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I&rsquo;m going to go through a bit of the nixos config I&rsquo;ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
<p>Having a way to to get into your server is useful. Managing ssh on nix is very simple; this enables the ssh daemon, tells it what port to run on, disables plain text passwords, and disables root login.</p>
@ -83,16 +84,16 @@
</span></span><span class="line"><span class="cl"> <span class="p">];</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span>
</span></span></code></pre></div><p>This means I can just rsync the updated site from my laptop to the server and it&rsquo;ll be updated within the hour. Good enough for me.</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -2,148 +2,178 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://nonsense.dymc.win/tags/film/</loc>
<loc>http://localhost:1313/backing-up-nixos-state-with-restic/</loc>
<lastmod>2026-02-16T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/</loc>
<lastmod>2026-02-16T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/nixos/</loc>
<lastmod>2026-02-16T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/posts/</loc>
<lastmod>2026-02-16T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/restic/</loc>
<lastmod>2026-02-16T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/</loc>
<lastmod>2026-02-16T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/film/</loc>
<lastmod>2026-02-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/</loc>
<loc>http://localhost:1313/wuthering-heights-2026/</loc>
<lastmod>2026-02-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/posts/</loc>
<lastmod>2026-02-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/</loc>
<lastmod>2026-02-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/wuthering-heights-2026/</loc>
<lastmod>2026-02-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/bash-script-twitch/</loc>
<loc>http://localhost:1313/tags/bash/</loc>
<lastmod>2025-08-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</loc>
<loc>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</loc>
<lastmod>2025-08-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/nixos/</loc>
<loc>http://localhost:1313/tags/twitch/</loc>
<lastmod>2025-08-13T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</loc>
<lastmod>2025-08-11T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</loc>
<lastmod>2025-08-11T00:00:00+00:00</lastmod>
<loc>http://localhost:1313/adventures-in-running-headscale-on-nixos/</loc>
<lastmod>2024-06-25T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/lua/</loc>
<loc>http://localhost:1313/tags/lua/</loc>
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/neovim/</loc>
<loc>http://localhost:1313/tags/neovim/</loc>
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</loc>
<loc>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</loc>
<lastmod>2024-04-06T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/home-manager/</loc>
<loc>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</loc>
<lastmod>2023-09-12T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/tailscale/</loc>
<lastmod>2023-09-12T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/home-manager/</loc>
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</loc>
<loc>http://localhost:1313/making-nix-colors-talk-to-neovim/</loc>
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/nix-colors/</loc>
<loc>http://localhost:1313/tags/nix-colors/</loc>
<lastmod>2023-08-18T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/css/</loc>
<loc>http://localhost:1313/tags/css/</loc>
<lastmod>2023-06-26T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/javascript/</loc>
<loc>http://localhost:1313/tags/javascript/</loc>
<lastmod>2023-06-26T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</loc>
<loc>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</loc>
<lastmod>2023-06-26T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/caddy/</loc>
<loc>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</loc>
<lastmod>2023-06-25T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/caddy/</loc>
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/self-hosting/</loc>
<loc>http://localhost:1313/tags/self-hosting/</loc>
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/tailscale/</loc>
<loc>http://localhost:1313/tailscale-caddy-and-nixos-containers/</loc>
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</loc>
<lastmod>2023-05-16T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</loc>
<loc>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</loc>
<lastmod>2023-04-03T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/python/</loc>
<loc>http://localhost:1313/tags/python/</loc>
<lastmod>2023-04-03T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/qtile/</loc>
<loc>http://localhost:1313/tags/qtile/</loc>
<lastmod>2023-04-03T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</loc>
<loc>http://localhost:1313/achieve-peak-rice-with-nix-colors/</loc>
<lastmod>2023-03-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/docker/</loc>
<loc>http://localhost:1313/placeholder/</loc>
<lastmod>2023-03-13T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/thing/</loc>
<lastmod>2023-03-13T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/wotsit/</loc>
<lastmod>2023-03-13T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/docker/</loc>
<lastmod>2023-02-28T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/podman/</loc>
<loc>http://localhost:1313/tags/podman/</loc>
<lastmod>2023-02-28T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/translating-docker-to-nix/</loc>
<loc>http://localhost:1313/translating-docker-to-nix/</loc>
<lastmod>2023-02-28T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</loc>
<loc>http://localhost:1313/simple-nixos-config-for-vps-static-site/</loc>
<lastmod>2023-01-29T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/python-podcast-scripting/</loc>
<loc>http://localhost:1313/python-podcast-scripting/</loc>
<lastmod>2023-01-24T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</loc>
<loc>http://localhost:1313/bread-dough-for-lazy-boys/</loc>
<lastmod>2023-01-22T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/cooking/</loc>
<loc>http://localhost:1313/tags/cooking/</loc>
<lastmod>2023-01-22T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/multi-user-qtile-fiddling/</loc>
<loc>http://localhost:1313/multi-user-qtile-fiddling/</loc>
<lastmod>2022-12-20T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/bash/</loc>
<loc>http://localhost:1313/teeny-tiny-bash-fetch-script/</loc>
<lastmod>2022-12-10T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</loc>
<lastmod>2022-12-10T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</loc>
<loc>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</loc>
<lastmod>2022-12-01T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/emacs/</loc>
<loc>http://localhost:1313/tags/emacs/</loc>
<lastmod>2022-11-18T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</loc>
<loc>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</loc>
<lastmod>2022-11-18T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/chess/</loc>
<loc>http://localhost:1313/tags/hugo/</loc>
<lastmod>2022-11-10T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</loc>
<lastmod>2022-11-10T00:00:00+00:00</lastmod>
</url><url>
<loc>http://localhost:1313/tags/chess/</loc>
<lastmod>2022-11-08T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</loc>
<loc>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</loc>
<lastmod>2022-11-08T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</loc>
<loc>http://localhost:1313/the-search-for-en-passant-checkmates/</loc>
<lastmod>2022-10-26T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</loc>
<loc>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</loc>
<lastmod>2022-10-02T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</loc>
<loc>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</loc>
<lastmod>2022-09-23T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/tags/music/</loc>
<loc>http://localhost:1313/tags/music/</loc>
<lastmod>2022-09-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</loc>
<loc>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</loc>
<lastmod>2022-09-13T00:00:00+00:00</lastmod>
</url><url>
<loc>https://nonsense.dymc.win/info/</loc>
<loc>http://localhost:1313/info/</loc>
</url><url>
<loc>https://nonsense.dymc.win/search/</loc>
<loc>http://localhost:1313/search/</loc>
</url><url>
<loc>https://nonsense.dymc.win/categories/</loc>
<loc>http://localhost:1313/categories/</loc>
</url>
</urlset>

View file

@ -1,40 +1,43 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/" />
<title>So you want to write a neovim plugin with lua - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/" />
<title>So you want to write a neovim plugin with lua</title>
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<article>
<header id="post-header">
<h2>So you want to write a neovim plugin with lua</h2>
<div>
<p>April 6, 2024</p>
<article class="post">
<header>
<h1>So you want to write a neovim plugin with lua</h1>
<time>Apr 6, 2024</time>
<div class="tags">
<a href="/tags/lua">lua</a>
<a href="/tags/neovim">neovim</a>
</div>
</header><p>I&rsquo;ve recently been messing around with writing neovim plugins.
</header>
<div class="content">
<p>I&rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&rsquo;s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
Beyond that, the thing I found most useful was simply reading the source of some popular plugins to get an idea of how things worked.
@ -100,16 +103,16 @@ As a little coda, this is how you can use your fancy new plugin using <a href="h
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">})</span>
</span></span></code></pre></div><p>Hope you&rsquo;ve enjoyed.</p>
</article>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</div>
</article>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

View file

@ -1,19 +1,19 @@
<!doctype html>
<html lang="en"><head>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/bash-script-twitch/index.xml" title="James' Blog">
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/bash-script-twitch/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<link rel="canonical" href="https://nonsense.dymc.win/tags/bash-script-twitch/" />
<link rel="canonical" href="http://localhost:1313/tags/bash-script-twitch/" />
<title>Bash, Script, Twitch</title>
</head>
<body><header id="banner">
<nav class="navbar">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a href="http://localhost:1313/" class="home">🏠</a>
<a
href="/info/"
@ -29,24 +29,34 @@
</nav>
</header>
<main id="content">
<a href="/backing-up-nixos-state-with-restic/">Backing up nixos state with restic</a>
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/adventures-in-running-headscale-on-nixos/">adventures in running headscale on nixos</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/">nginx reverse-proxy with SSL for services running on tailscale!</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/">configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/placeholder/">placeholder</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
@ -63,6 +73,8 @@
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>

View file

@ -2,22 +2,94 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Bash, Script, Twitch on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/bash-script-twitch/</link>
<link>http://localhost:1313/tags/bash-script-twitch/</link>
<description>Recent content in Bash, Script, Twitch on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Wed, 13 Aug 2025 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/bash-script-twitch/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/bash-script-twitch/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS to a hetzner storage box.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;restic&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;forgejo&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;stateDir&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/remotelab&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-remotelab-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnSuccess&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-success-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-success-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup success&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.dymc.win/backups &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from remotelab to storage-box completed.&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Success&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.dymc.win/backups &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from remotelab to storage-box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -46,10 +118,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +223,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +314,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +402,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +492,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +577,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +666,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +778,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +875,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +942,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1002,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1094,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1140,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1220,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1292,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1300,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1364,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1440,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1534,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1560,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1589,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1627,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1635,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1701,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1721,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1737,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1753,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -0,0 +1,50 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="http://localhost:1313/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/bash-script/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<link rel="canonical" href="http://localhost:1313/tags/bash-script/" />
<title>Bash Script</title>
</head>
<body><header id="banner">
<nav class="navbar">
<a href="http://localhost:1313/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
</nav>
</header>
<main id="content">
<h1>Tag: Bash Script</h1>
<ul>
<li><a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a></li>
</ul>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
</footer>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,86 +1,54 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/bash/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/bash/" />
<title>Bash - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/bash/" />
<title>Bash</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/bash/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Aug 13, 2025</time>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
</li>
<li>
<time>Dec 10, 2022</time>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
</li>
<li>
<time>Sep 13, 2022</time>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Bash on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/bash/</link>
<link>http://localhost:1313/tags/bash/</link>
<description>Recent content in Bash on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Sat, 10 Dec 2022 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Wed, 13 Aug 2025 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/bash/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/bash/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/caddy/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/caddy/" />
<title>Caddy - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/caddy/" />
<title>Caddy</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/caddy/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>May 16, 2023</time>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Caddy on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/caddy/</link>
<link>http://localhost:1313/tags/caddy/</link>
<description>Recent content in Caddy on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Tue, 16 May 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/caddy/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/caddy/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,49 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/chess/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/chess/" />
<title>Chess - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/chess/" />
<title>Chess</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/chess/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Nov 8, 2022</time>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
</li>
<li>
<time>Oct 26, 2022</time>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Chess on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/chess/</link>
<link>http://localhost:1313/tags/chess/</link>
<description>Recent content in Chess on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Tue, 08 Nov 2022 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/chess/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/chess/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/cooking/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/cooking/" />
<title>Cooking - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/cooking/" />
<title>Cooking</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/cooking/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Jan 22, 2023</time>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Cooking on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/cooking/</link>
<link>http://localhost:1313/tags/cooking/</link>
<description>Recent content in Cooking on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Sun, 22 Jan 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/cooking/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/cooking/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/css/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/css/" />
<title>Css - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/css/" />
<title>Css</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/css/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Jun 26, 2023</time>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Css on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/css/</link>
<link>http://localhost:1313/tags/css/</link>
<description>Recent content in Css on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Mon, 26 Jun 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/css/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/css/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/docker/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/docker/" />
<title>Docker - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/docker/" />
<title>Docker</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/docker/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Feb 28, 2023</time>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Docker on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/docker/</link>
<link>http://localhost:1313/tags/docker/</link>
<description>Recent content in Docker on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Tue, 28 Feb 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/docker/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/docker/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/emacs/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/emacs/" />
<title>Emacs - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/emacs/" />
<title>Emacs</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/emacs/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Nov 18, 2022</time>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Emacs on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/emacs/</link>
<link>http://localhost:1313/tags/emacs/</link>
<description>Recent content in Emacs on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Fri, 18 Nov 2022 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/emacs/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/emacs/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/film/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/film/" />
<title>Film - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/film/" />
<title>Film</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/film/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Feb 13, 2026</time>
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Film on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/film/</link>
<link>http://localhost:1313/tags/film/</link>
<description>Recent content in Film on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Fri, 13 Feb 2026 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/film/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/film/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,64 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/home-manager/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/home-manager/" />
<title>Home-Manager - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/home-manager/" />
<title>Home-Manager</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/home-manager/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Aug 18, 2023</time>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
<li>
<time>Jun 25, 2023</time>
<a href="/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/">configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</a>
</li>
<li>
<time>Mar 13, 2023</time>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
</li>
<li>
<time>Dec 20, 2022</time>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<time>Oct 2, 2022</time>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Home-Manager on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/home-manager/</link>
<link>http://localhost:1313/tags/home-manager/</link>
<description>Recent content in Home-Manager on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Fri, 18 Aug 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/home-manager/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/home-manager/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -0,0 +1,44 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/hugo/" />
<title>Hugo - James&#39; Blog</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/hugo/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<li>
<time>Nov 10, 2022</time>
<a href="/setting-up-a-lean-mean-hugo-blogging-theme/">setting up a lean mean hugo blogging theme</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

1796
public/tags/hugo/index.xml Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,86 +1,164 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/" />
<title>Tags - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/" />
<title>Tags</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Feb 16, 2026</time>
<a href="/tags/nixos/">Nixos</a>
</li>
<li>
<time>Feb 16, 2026</time>
<a href="/tags/restic/">Restic</a>
</li>
<li>
<time>Feb 13, 2026</time>
<a href="/tags/film/">Film</a>
</li>
<li>
<time>Aug 13, 2025</time>
<a href="/tags/bash/">Bash</a>
</li>
<li>
<time>Aug 13, 2025</time>
<a href="/tags/twitch/">Twitch</a>
</li>
<li>
<time>Apr 6, 2024</time>
<a href="/tags/lua/">Lua</a>
</li>
<li>
<time>Apr 6, 2024</time>
<a href="/tags/neovim/">Neovim</a>
</li>
<li>
<time>Sep 12, 2023</time>
<a href="/tags/tailscale/">Tailscale</a>
</li>
<li>
<time>Aug 18, 2023</time>
<a href="/tags/home-manager/">Home-Manager</a>
</li>
<li>
<time>Aug 18, 2023</time>
<a href="/tags/nix-colors/">Nix-Colors</a>
</li>
<li>
<time>Jun 26, 2023</time>
<a href="/tags/css/">Css</a>
</li>
<li>
<time>Jun 26, 2023</time>
<a href="/tags/javascript/">Javascript</a>
</li>
<li>
<time>May 16, 2023</time>
<a href="/tags/caddy/">Caddy</a>
</li>
<li>
<time>May 16, 2023</time>
<a href="/tags/self-hosting/">Self-Hosting</a>
</li>
<li>
<time>Apr 3, 2023</time>
<a href="/tags/python/">Python</a>
</li>
<li>
<time>Apr 3, 2023</time>
<a href="/tags/qtile/">Qtile</a>
</li>
<li>
<time>Mar 13, 2023</time>
<a href="/tags/thing/">Thing</a>
</li>
<li>
<time>Mar 13, 2023</time>
<a href="/tags/wotsit/">Wotsit</a>
</li>
<li>
<time>Feb 28, 2023</time>
<a href="/tags/docker/">Docker</a>
</li>
<li>
<time>Feb 28, 2023</time>
<a href="/tags/podman/">Podman</a>
</li>
<li>
<time>Jan 22, 2023</time>
<a href="/tags/cooking/">Cooking</a>
</li>
<li>
<time>Nov 18, 2022</time>
<a href="/tags/emacs/">Emacs</a>
</li>
<li>
<time>Nov 10, 2022</time>
<a href="/tags/hugo/">Hugo</a>
</li>
<li>
<time>Nov 8, 2022</time>
<a href="/tags/chess/">Chess</a>
</li>
<li>
<time>Sep 13, 2022</time>
<a href="/tags/music/">Music</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tags on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/</link>
<link>http://localhost:1313/tags/</link>
<description>Recent content in Tags on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Fri, 13 Feb 2026 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Mon, 16 Feb 2026 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/javascript/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/javascript/" />
<title>Javascript - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/javascript/" />
<title>Javascript</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/javascript/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Jun 26, 2023</time>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Javascript on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/javascript/</link>
<link>http://localhost:1313/tags/javascript/</link>
<description>Recent content in Javascript on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Mon, 26 Jun 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/lua/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/lua/" />
<title>Lua - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/lua/" />
<title>Lua</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/lua/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Apr 6, 2024</time>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Lua on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/lua/</link>
<link>http://localhost:1313/tags/lua/</link>
<description>Recent content in Lua on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Sat, 06 Apr 2024 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/lua/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/lua/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/music/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/music/" />
<title>Music - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/music/" />
<title>Music</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/music/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Sep 13, 2022</time>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Music on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/music/</link>
<link>http://localhost:1313/tags/music/</link>
<description>Recent content in Music on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Tue, 13 Sep 2022 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/music/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/music/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,49 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/neovim/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/neovim/" />
<title>Neovim - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/neovim/" />
<title>Neovim</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/neovim/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Apr 6, 2024</time>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
</li>
<li>
<time>Aug 18, 2023</time>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Neovim on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/neovim/</link>
<link>http://localhost:1313/tags/neovim/</link>
<description>Recent content in Neovim on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Sat, 06 Apr 2024 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/neovim/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/neovim/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,49 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/nix-colors/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/nix-colors/" />
<title>Nix-Colors - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/nix-colors/" />
<title>Nix-Colors</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/nix-colors/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Aug 18, 2023</time>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
<li>
<time>Mar 13, 2023</time>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Nix-Colors on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/nix-colors/</link>
<link>http://localhost:1313/tags/nix-colors/</link>
<description>Recent content in Nix-Colors on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Fri, 18 Aug 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/nix-colors/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/nix-colors/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,99 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/nixos/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/nixos/" />
<title>Nixos - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/nixos/" />
<title>Nixos</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/nixos/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Feb 16, 2026</time>
<a href="/backing-up-nixos-state-with-restic/">Backing up nixos state with restic</a>
</li>
<li>
<time>Aug 11, 2025</time>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
</li>
<li>
<time>Jun 25, 2024</time>
<a href="/adventures-in-running-headscale-on-nixos/">adventures in running headscale on nixos</a>
</li>
<li>
<time>Sep 12, 2023</time>
<a href="/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/">nginx reverse-proxy with SSL for services running on tailscale!</a>
</li>
<li>
<time>Aug 18, 2023</time>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
</li>
<li>
<time>Jun 25, 2023</time>
<a href="/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/">configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</a>
</li>
<li>
<time>May 16, 2023</time>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
<li>
<time>Mar 13, 2023</time>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
</li>
<li>
<time>Feb 28, 2023</time>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
</li>
<li>
<time>Jan 29, 2023</time>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
</li>
<li>
<time>Dec 20, 2022</time>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<time>Oct 2, 2022</time>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Nixos on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/nixos/</link>
<link>http://localhost:1313/tags/nixos/</link>
<description>Recent content in Nixos on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Mon, 11 Aug 2025 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Mon, 16 Feb 2026 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/nixos/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/nixos/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/podman/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/podman/" />
<title>Podman - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/podman/" />
<title>Podman</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/podman/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Feb 28, 2023</time>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Podman on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/podman/</link>
<link>http://localhost:1313/tags/podman/</link>
<description>Recent content in Podman on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Tue, 28 Feb 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/podman/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/podman/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,74 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/python/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/python/" />
<title>Python - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/python/" />
<title>Python</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/python/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Apr 3, 2023</time>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
</li>
<li>
<time>Jan 24, 2023</time>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
</li>
<li>
<time>Dec 20, 2022</time>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<time>Dec 1, 2022</time>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
</li>
<li>
<time>Nov 8, 2022</time>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
</li>
<li>
<time>Oct 26, 2022</time>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
</li>
<li>
<time>Sep 23, 2022</time>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Python on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/python/</link>
<link>http://localhost:1313/tags/python/</link>
<description>Recent content in Python on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Mon, 03 Apr 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/python/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/python/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,54 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/qtile/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/qtile/" />
<title>Qtile - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/qtile/" />
<title>Qtile</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/qtile/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Apr 3, 2023</time>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
</li>
<li>
<time>Dec 20, 2022</time>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
</li>
<li>
<time>Sep 23, 2022</time>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Qtile on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/qtile/</link>
<link>http://localhost:1313/tags/qtile/</link>
<description>Recent content in Qtile on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Mon, 03 Apr 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/qtile/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/qtile/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -0,0 +1,44 @@
<!doctype html>
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/restic/" />
<title>Restic - James&#39; Blog</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/restic/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<li>
<time>Feb 16, 2026</time>
<a href="/backing-up-nixos-state-with-restic/">Backing up nixos state with restic</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</html>

1796
public/tags/restic/index.xml Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,86 +1,44 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/self-hosting/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/self-hosting/" />
<title>Self-Hosting - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/self-hosting/" />
<title>Self-Hosting</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/self-hosting/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>May 16, 2023</time>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

View file

@ -2,22 +2,100 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Self-Hosting on James&#39; Blog</title>
<link>https://nonsense.dymc.win/tags/self-hosting/</link>
<link>http://localhost:1313/tags/self-hosting/</link>
<description>Recent content in Self-Hosting on James&#39; Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-GB</language>
<lastBuildDate>Tue, 16 May 2023 00:00:00 +0000</lastBuildDate>
<atom:link href="https://nonsense.dymc.win/tags/self-hosting/index.xml" rel="self" type="application/rss+xml" />
<atom:link href="http://localhost:1313/tags/self-hosting/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Backing up nixos state with restic</title>
<link>http://localhost:1313/backing-up-nixos-state-with-restic/</link>
<pubDate>Mon, 16 Feb 2026 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/backing-up-nixos-state-with-restic/</guid>
<description>&lt;p&gt;I&amp;rsquo;m writing this so I can hopefully remember what I did in six months.&lt;/p&gt;
&lt;p&gt;As hard as you try to eliminate all state from your computing life with nixos, the fact remains that you can&amp;rsquo;t get rid of all of it.
For example, I run forgejo on my VPS.
I have my config which means I could set up a forgejo instance just how I like it if everything went to pot.
But that wouldn&amp;rsquo;t bring back any of the repos I had there previously.&lt;/p&gt;
&lt;p&gt;This is the method I cooked up for backing up some of those important bits and bob from my VPS.&lt;/p&gt;
&lt;h3 id=&#34;restic&#34;&gt;Restic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://restic.net/&#34;&gt;Restic&lt;/a&gt; is a project which facilitates the encrypted, deduplicated backing up of your data to SFTP, S3, and various other cloud providers.
My backup target is a hetzner storage box which is compatible with SFTP so that&amp;rsquo;s the route I chose.
After browsing the &lt;a href=&#34;https://search.nixos.org/options?channel=unstable&amp;amp;query=restic&#34;&gt;available nixos options&lt;/a&gt;, I came up with this little config.
It sets up a restic job to be run daily by root backing up some of &lt;code&gt;/var/lib&lt;/code&gt; over sftp to the hetzner storage box (I&amp;rsquo;ve put in placeholder values).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;backups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hetzner-storage-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;initialize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;passwordFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/nixos/secrets/restic&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;paths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/important&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/var/lib/stuff&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;repository&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp:user@storagebox:/payload&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;extraOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sftp.command=&amp;#39;ssh user@storagebox -i /root/.ssh/id_ed25519 -s sftp&amp;#39;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;timerConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnCalendar&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;daily&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Persistent&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;security-concerns&#34;&gt;Security concerns&lt;/h3&gt;
&lt;p&gt;The eagle-eyed among you will have noticed some GAPING security flaws in this setup.
Firstly, my root user needs passwordless ssh access to the storage box.
Secondly, the password used to encrypt the backup is sitting in plaintext on my server at &lt;code&gt;/etc/nixos/secrets/restic&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The first issue seems a little tricky to solve.
As far as I know there&amp;rsquo;s no way round the passwordless detail if you want an automated backup.
It would be better to run the backup as a less privileged user that still has permissions to the stuff you want to backup.
I&amp;rsquo;m not sure how to do that though and the whole thing seemed sufficiently complicated alraedy for me.
I found something about it in the docs &lt;a href=&#34;https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second issue is extremely solvable with something like &lt;a href=&#34;https://github.com/Mic92/sops-nix&#34;&gt;sops-nix&lt;/a&gt; which I really do intend to setup at some point I promise!&lt;/p&gt;
&lt;h3 id=&#34;bonus-notifications&#34;&gt;Bonus: notifications&lt;/h3&gt;
&lt;p&gt;Seeing as these backups are going to be chugging away in the background in the middle of the night, it would be useful to be notified if they went wrong.
The nixos service sets up a systemd service for the restic job.
We can piggyback off this one with another systemd service which runs when the restic service fails.
This new service simply curls my &lt;a href=&#34;https://ntfy.sh&#34;&gt;ntfy&lt;/a&gt; server with an uh oh pay attention message.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-vps-storage-box&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;wantedBy&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;multi-user.target&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;unitConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;OnFailure&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;restic-backups-failure-notify.service&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;systemd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;restic-backups-failure-notify&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;description&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Notify on restic backup failure&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;serviceConfig&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;oneshot&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ExecStart&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pkgs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/bin/curl -s -X POST https://ntfy.sh/restic-backups-topic &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-d &amp;#39;Restic backup from VPS to storage box failed!&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Title: Backup Failed&amp;#39; &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-H &amp;#39;Priority: high&amp;#39; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;User&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks for reading :)&lt;/p&gt;
</description>
</item>
<item>
<title>Wuthering Heights (2026)</title>
<link>https://nonsense.dymc.win/wuthering-heights-2026/</link>
<link>http://localhost:1313/wuthering-heights-2026/</link>
<pubDate>Fri, 13 Feb 2026 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/wuthering-heights-2026/</guid>
<guid>http://localhost:1313/wuthering-heights-2026/</guid>
<description>&lt;h3 id=&#34;things-i-enjoyed&#34;&gt;Things I enjoyed&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Though not particularly &amp;lsquo;dark skinned&amp;rsquo;, Jacob Elordi is well suited to the role of surly sweaty gigahunk.&lt;/li&gt;
@ -31,7 +109,7 @@ It felt like a set not something the characters actually inahbited.
Even when they were banging on the moors they didn&amp;rsquo;t seem to get muddy.
This was a problem for me.&lt;/li&gt;
&lt;li&gt;Fundamentally, once you got past the visual glitz and knowingly executed tropes it felt completely emotionally empty.
Given that it&amp;rsquo;s a film about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
Given that this version seems to be about the enduring power of passionate undying love this was also a major problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;things-that-intrigued-me&#34;&gt;Things that intrigued me&lt;/h3&gt;
&lt;ul&gt;
@ -46,10 +124,10 @@ Given that it&amp;rsquo;s a film about the enduring power of passionate undying
<item>
<title>Handy script for a more zen twitch experience</title>
<link>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</link>
<link>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</link>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/handy-script-for-a-more-zen-twitch-experience/</guid>
<guid>http://localhost:1313/handy-script-for-a-more-zen-twitch-experience/</guid>
<description>&lt;p&gt;I like to watch twitch streams.
Watching them in the browser at &lt;code&gt;twitch.tv&lt;/code&gt; is generally not an experience which sparks joy though.
I&amp;rsquo;m buffering.
@ -151,15 +229,15 @@ Here it is:&lt;/p&gt;
<item>
<title>Over-engineered (?) nixos blog deployment setup</title>
<link>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</link>
<link>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</link>
<pubDate>Mon, 11 Aug 2025 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/over-engineered-nixos-blog-deployment-setup/</guid>
<guid>http://localhost:1313/over-engineered-nixos-blog-deployment-setup/</guid>
<description>&lt;p&gt;As is traditional with people hosting their own blog I&amp;rsquo;m going to do a post detailing EXACTLY how I&amp;rsquo;m hosting my blog.
Down to the last dirty detail.
I have nothing better to talk about.&lt;/p&gt;
&lt;p&gt;Here is a diagram I edited to illustrate (credit to xkcd I think?).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/self-hosting.png&#34; alt=&#34;self-hosting&#34;&gt;&lt;/p&gt;
&lt;p&gt;I host my site on a hetzner vps running nixos.
I also have a git repo where all the static files for my blog live.
I had previously been manually rsyncing the website up to my vps from my laptop.
@ -242,12 +320,23 @@ That&amp;rsquo;s the directory of the git repo that the website source lives.&lt
<item>
<title>adventures in running headscale on nixos</title>
<link>http://localhost:1313/adventures-in-running-headscale-on-nixos/</link>
<pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/adventures-in-running-headscale-on-nixos/</guid>
<description></description>
</item>
<item>
<title>So you want to write a neovim plugin with lua</title>
<link>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<link>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</link>
<pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<guid>http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/</guid>
<description>&lt;p&gt;I&amp;rsquo;ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There&amp;rsquo;s the &lt;a href=&#34;https://neovim.io/doc&#34;&gt;official neovim docs&lt;/a&gt; which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@ -319,12 +408,47 @@ As a little coda, this is how you can use your fancy new plugin using &lt;a href
<item>
<title>nginx reverse-proxy with SSL for services running on tailscale!</title>
<link>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</link>
<pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/</guid>
<description>&lt;p&gt;So you&amp;rsquo;re running something on a server somewhere. For whatever reason you cant or don&amp;rsquo;t want to expose ports 80 and 443 to the outside world.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-nix&#34; data-lang=&#34;nix&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;jellyfin&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;security&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;acme&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acceptTerms&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;defaults&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;barry@email.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;dnsProvider&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cloudflare&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;credentialsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/etc/credentials.env&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nginx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;virtualHosts&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;enableACME&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;acmeRoot&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;addSSL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;locations&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyPass&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://127.0.0.1:8096&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;proxyWebsockets&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
</item>
<item>
<title>Making nix-colors talk to neovim</title>
<link>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</link>
<link>http://localhost:1313/making-nix-colors-talk-to-neovim/</link>
<pubDate>Fri, 18 Aug 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/</guid>
<guid>http://localhost:1313/making-nix-colors-talk-to-neovim/</guid>
<description>&lt;p&gt;I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with &lt;a href=&#34;https://github.com/misterio77/nix-colors&#34;&gt;nix-colors&lt;/a&gt; so that my neovim theme would follow color changes in home-manager.&lt;/p&gt;
&lt;p&gt;Luckily, I came across &lt;a href=&#34;https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md&#34;&gt;this&lt;/a&gt; handy little plugin from the lovely &lt;a href=&#34;https://github.com/echasnovski/mini.nvim&#34;&gt;mini.nvim&lt;/a&gt; suite of plugins which lets you create your own theme with your custom colors.&lt;/p&gt;
@ -374,10 +498,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Vanilla javascript theme toggle for simpletons</title>
<link>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</link>
<link>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</link>
<pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<guid>http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/</guid>
<description>&lt;p&gt;Sometimes when I&amp;rsquo;m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I&amp;rsquo;ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you&amp;rsquo;re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.&lt;/p&gt;
&lt;p&gt;Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.&lt;/p&gt;
&lt;h3 id=&#34;html&#34;&gt;HTML&lt;/h3&gt;
@ -459,12 +583,30 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>configuring a dynamic, modern, and minimal DIY wayland desktop environment with home-manager</title>
<link>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</link>
<pubDate>Sun, 25 Jun 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/configuring-a-dynamic-modern-and-minimal-diy-wayland-desktop-environment-with-home-manager/</guid>
<description>&lt;h3 id=&#34;components&#34;&gt;components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;hyprland (window manager)&lt;/li&gt;
&lt;li&gt;waybar (bar)&lt;/li&gt;
&lt;li&gt;wofi (application launcher)&lt;/li&gt;
&lt;li&gt;mako (notification daemon)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>Tailscale, caddy, and nixos containers</title>
<link>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</link>
<link>http://localhost:1313/tailscale-caddy-and-nixos-containers/</link>
<pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers/</guid>
<guid>http://localhost:1313/tailscale-caddy-and-nixos-containers/</guid>
<description>&lt;p&gt;For a little while now I&amp;rsquo;ve been running some services (jellyfin etc.) on an old laptop in my house. I&amp;rsquo;m not trying to sound like a podcast ad but as a networking novice, the simplicity &lt;a href=&#34;https://tailscale.com/&#34;&gt;tailscale&lt;/a&gt; brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you&amp;rsquo;d have a reverse proxy and set up SSL certs so your browser doesn&amp;rsquo;t get stressed and you dont have to rememeber ip addresses and port numbers.&lt;/p&gt;
&lt;p&gt;When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across &lt;a href=&#34;https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380&#34;&gt;this&lt;/a&gt;. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.&lt;/p&gt;
&lt;h3 id=&#34;what-to-do&#34;&gt;what to do?&lt;/h3&gt;
@ -530,10 +672,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Learning about qtile widgets with cricket</title>
<link>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</link>
<link>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</link>
<pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/learning-about-qtile-widgets-with-cricket/</guid>
<guid>http://localhost:1313/learning-about-qtile-widgets-with-cricket/</guid>
<description>&lt;p&gt;I&amp;rsquo;m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.&lt;/p&gt;
&lt;p&gt;The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I&amp;rsquo;m sure this will interest very few people but I learnt some good stuff along the way.&lt;/p&gt;
&lt;h3 id=&#34;hello-world&#34;&gt;Hello World?!&lt;/h3&gt;
@ -642,10 +784,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Achieve peak rice with nix-colors</title>
<link>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</link>
<link>http://localhost:1313/achieve-peak-rice-with-nix-colors/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/achieve-peak-rice-with-nix-colors/</guid>
<guid>http://localhost:1313/achieve-peak-rice-with-nix-colors/</guid>
<description>&lt;p&gt;As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: &amp;lsquo;oh this is cool I can specify which desktop environment to use in my configuration.nix&amp;rsquo;. Next thing you know you&amp;rsquo;ve discovered &lt;a href=&#34;https://github.com/nix-community/home-manager&#34;&gt;home-manager&lt;/a&gt; and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sr.ht/~misterio/nix-colors/&#34;&gt;Nix-colors&lt;/a&gt; lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!&lt;/p&gt;
&lt;h3 id=&#34;how-to-make-it-work&#34;&gt;how to make it work&lt;/h3&gt;
@ -739,12 +881,23 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>placeholder</title>
<link>http://localhost:1313/placeholder/</link>
<pubDate>Mon, 13 Mar 2023 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/placeholder/</guid>
<description></description>
</item>
<item>
<title>Translating docker to nix?!</title>
<link>https://nonsense.dymc.win/translating-docker-to-nix/</link>
<link>http://localhost:1313/translating-docker-to-nix/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/translating-docker-to-nix/</guid>
<guid>http://localhost:1313/translating-docker-to-nix/</guid>
<description>&lt;p&gt;In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can&amp;rsquo;t be beat. I&amp;rsquo;ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I&amp;rsquo;ve been playing around with the nixos approach to managing docker containers.&lt;/p&gt;
&lt;h3 id=&#34;nix---docker-compose---docker-run&#34;&gt;nix -&amp;gt; docker compose -&amp;gt; docker run&lt;/h3&gt;
&lt;p&gt;To illustrate how to translate a simple example from the world of docker to nix let&amp;rsquo;s have a look at the config for my &lt;a href=&#34;https://docs.searxng.org/&#34;&gt;searxng&lt;/a&gt; instance.&lt;/p&gt;
@ -795,10 +948,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Simple nixos config for vps static site</title>
<link>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</link>
<link>http://localhost:1313/simple-nixos-config-for-vps-static-site/</link>
<pubDate>Sun, 29 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/</guid>
<guid>http://localhost:1313/simple-nixos-config-for-vps-static-site/</guid>
<description>&lt;p&gt;Setting up a little static site is something I&amp;rsquo;ve done a few different times on a few different operating systems. It&amp;rsquo;s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let&amp;rsquo;s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to go through a bit of the nixos config I&amp;rsquo;ve got for my vps.&lt;/p&gt;
&lt;h3 id=&#34;ssh&#34;&gt;SSH&lt;/h3&gt;
@ -855,10 +1008,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Python podcast scripting</title>
<link>https://nonsense.dymc.win/python-podcast-scripting/</link>
<link>http://localhost:1313/python-podcast-scripting/</link>
<pubDate>Tue, 24 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/python-podcast-scripting/</guid>
<guid>http://localhost:1313/python-podcast-scripting/</guid>
<description>&lt;p&gt;I have an old sad android phone with 2GB of ram which nowadays seems struggles these days. As a result of this I have been &amp;lsquo;podcast-player-hopping&amp;rsquo; without success for the last couple of months trying to find something which doesn&amp;rsquo;t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;write python script to download podcasts&lt;/li&gt;
@ -947,10 +1100,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Bread dough for lazy boys</title>
<link>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</link>
<link>http://localhost:1313/bread-dough-for-lazy-boys/</link>
<pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/bread-dough-for-lazy-boys/</guid>
<guid>http://localhost:1313/bread-dough-for-lazy-boys/</guid>
<description>&lt;h3 id=&#34;ingredienti&#34;&gt;INGREDIENTI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;flour (ideally bread flour but if you don&amp;rsquo;t have it, it&amp;rsquo;s not the end of the world)&lt;/li&gt;
@ -993,10 +1146,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Multi user qtile fiddling</title>
<link>https://nonsense.dymc.win/multi-user-qtile-fiddling/</link>
<link>http://localhost:1313/multi-user-qtile-fiddling/</link>
<pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/multi-user-qtile-fiddling/</guid>
<guid>http://localhost:1313/multi-user-qtile-fiddling/</guid>
<description>&lt;p&gt;This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using &lt;code&gt;xdg.configFile&lt;/code&gt;. This is what I do with my qtile &lt;code&gt;config.py&lt;/code&gt;. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.&lt;/p&gt;
&lt;h3 id=&#34;the-nub-of-the-problem&#34;&gt;THE NUB OF THE PROBLEM&lt;/h3&gt;
&lt;p&gt;I basically just want the config to work out which computer it&amp;rsquo;&amp;rsquo;s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:&lt;/p&gt;
@ -1073,10 +1226,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Teeny tiny bash fetch script</title>
<link>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</link>
<link>http://localhost:1313/teeny-tiny-bash-fetch-script/</link>
<pubDate>Sat, 10 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/</guid>
<guid>http://localhost:1313/teeny-tiny-bash-fetch-script/</guid>
<description>&lt;p&gt;This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn&amp;rsquo;t really try that hard with the portability). I didn&amp;rsquo;t think much about performance; I&amp;rsquo;m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; -A &lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;user&lt;span class=&#34;o&#34;&gt;]=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$USER&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
@ -1145,7 +1298,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;random_color&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; \e[0;1;3m&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\e[0m&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;sep&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;fetch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$info&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety &lt;a href=&#34;https://gitlab.com/robbygozzarder/golazo&#34;&gt;here&lt;/a&gt;. This is a pretty picture of a few variations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/golazo.png&#34; alt=&#34;golazo&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1153,10 +1306,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Get the thoughts out of your head and into a digital format with this python journalling script</title>
<link>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<link>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</link>
<pubDate>Thu, 01 Dec 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<guid>http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/</guid>
<description>&lt;p&gt;Since getting going with emacs I&amp;rsquo;ve gone down the org-mode rabbit hole a little bit. In particular the very nice &lt;a href=&#34;https://github.com/bastibe/org-journal&#34;&gt;org-journal&lt;/a&gt; package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I&amp;rsquo;m doing something with my text editor makes it a lot more palletable.&lt;/p&gt;
&lt;p&gt;Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal&amp;rsquo;s features but allow you to use whatever editor you like with markdown.&lt;/p&gt;
&lt;h3 id=&#34;whats-the-time&#34;&gt;WHAT&amp;rsquo;S THE TIME?&lt;/h3&gt;
@ -1217,10 +1370,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Lowkey emacs setup bits and bobs</title>
<link>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</link>
<link>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</link>
<pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/lowkey-emacs-setup-bits-and-bobs/</guid>
<guid>http://localhost:1313/lowkey-emacs-setup-bits-and-bobs/</guid>
<description>&lt;p&gt;About a month ago I was a little bored and thought I&amp;rsquo;d give emacs a go. There&amp;rsquo;s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There&amp;rsquo;s also the quite jarring default theme which wasn&amp;rsquo;t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I&amp;rsquo;ve landed on a simple little setup that I&amp;rsquo;ve been quite enjoying. Here are a few little pointers to hopefully ease you in.&lt;/p&gt;
&lt;h3 id=&#34;aesthetic-niceties&#34;&gt;AESTHETIC NICETIES&lt;/h3&gt;
&lt;p&gt;First things first, assuming you&amp;rsquo;re on linux emacs is configured with a file at &lt;code&gt;~/.emacs.d/init.el&lt;/code&gt;. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with &lt;code&gt;M-x load-theme&lt;/code&gt;; if you want the setting to persist though you can add this to you init.el:&lt;/p&gt;
@ -1293,7 +1446,93 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;use-package&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;ss&#34;&gt;:bind&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;M-c&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;.&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;smart-comment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s a little pic of the current setup :)&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/emacs.png&#34; alt=&#34;emacs&#34;&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>setting up a lean mean hugo blogging theme</title>
<link>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</link>
<pubDate>Thu, 10 Nov 2022 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/</guid>
<description>&lt;p&gt;When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you&amp;rsquo;ve just run something like &lt;code&gt;hugo new site lovely-new-website&lt;/code&gt;, entered the new directory with &lt;code&gt;cd lovely-new-website&lt;/code&gt; and you&amp;rsquo;ve got a selection of mostly empty directories looking something like this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── config.toml
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── content
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── public
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── themes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend &lt;a href=&#34;https://github.com/ericmurphyxyz/hugo-starter-theme&#34;&gt;this&lt;/a&gt; guy which I used to get up and running. You could also check out &lt;a href=&#34;https://gitlab.com/robbygozzarder/mcl&#34;&gt;my theme&lt;/a&gt; which I&amp;rsquo;m using on this site that is also very simple (as you can probably see from the website lol). Once you&amp;rsquo;ve got a theme with (I&amp;rsquo;m using mine as an example) &lt;code&gt;git clone https://gitlab.com/robbygozzarder/mcl&lt;/code&gt; and placed it in the themes directory you&amp;rsquo;ll need to adjust your config.toml file to point it to this theme.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;theme&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mcl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The directory structure of your new theme will look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;└── mcl
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── archetypes
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── default.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── layouts
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── 404.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── _default
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   ├── list.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   │   └── single.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── index.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── partials
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── footer.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   ├── header.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; │   └── nav.html
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; ├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── static
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── css
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; └── style.css
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is where most of the magic happens:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The default.md file in the archetypes directory dictates what template to follow when adding new post files.&lt;/li&gt;
&lt;li&gt;The layouts directory is where most of the meat is:
&lt;ul&gt;
&lt;li&gt;Firstly, there&amp;rsquo;s the partials directory which contains outlines for sections which you want to be used multiple times across the site such as a footer (footer.html)&lt;/li&gt;
&lt;li&gt;Sceondly, we have _default which contains outlines for the two types of hugo pages; singles (single.html) such as this individual post page, and lists (list.html) such as the tags and posts pages on this site.&lt;/li&gt;
&lt;li&gt;Partials also contains index.html which (you guessed it!) is your home page.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last but not least, there&amp;rsquo;s static which as you can see just has the css for the site (this is all looks though - the action happens in partials).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is where you put your posts - these are just markdown files which hugo converts to html for you.&lt;/li&gt;
&lt;li&gt;Public is where hugo puts your built - ready to be served - site. You can then copy this directory to wherever your webserver is looking eg. /var/www/jdysmcl&lt;/li&gt;
&lt;li&gt;Static is where assets which you want to use with your site are kept. I basically just use it for images which I can then reference from my posts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we&amp;rsquo;ve got the directory what&amp;rsquo;s happening where admin out the way let&amp;rsquo;s have a look at what some of the html files in the themes directory look like; this is the index.html for my site for example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;header.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;This is mainly a place for me to document various
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bits and bobs I&amp;#39;ve been doing on my computers.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am a noob in most things so take anything written
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;here with a pinch of salt. Lots of love :)&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ range .Site.RegularPages | first 5 }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .Title }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Summary }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;br&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .Date.Format &amp;#34;06 Jan, 2006&amp;#34; }} |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .WordCount }} words |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ .ReadingTime }} mins |
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ range (.GetTerms &amp;#34;tags&amp;#34;) }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;{{ .Permalink }}&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{{ .LinkTitle }}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{{ partial &amp;#34;footer.html&amp;#34; . }}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In short, this plops the header and footer partials at the top and bottom of the page respectively, includes a short warning not to listen to me, and then displays my five most recent posts along with a snippet of the post and some accompanyning info: date, word count, reading time, and tags. The keen eyed among you will have noticed that this is a mish mash of normal html tags and strange stuff enclosed in double curly brackets. I&amp;rsquo;m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs &lt;a href=&#34;https://gohugo.io/templates/introduction&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
</item>
@ -1301,10 +1540,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates 2: Electric Boogaloo</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</link>
<pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates-2-electric-boogaloo/</guid>
<description>&lt;p&gt;Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parse this info for the pgn (portable game notation) of each game.&lt;/li&gt;
@ -1327,7 +1566,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pgns&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;write&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pgn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now a pgn looks something like this if it&amp;rsquo;s just printed as a string:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/pgn.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;moves&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;e5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Bc4&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nc6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qh5&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Nf6&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Qxf7#&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We don&amp;rsquo;t need the headers, we don&amp;rsquo;t need the result, and we don&amp;rsquo;t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.&lt;/p&gt;
@ -1356,10 +1595,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>The search for en passant checkmates</title>
<link>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</link>
<link>http://localhost:1313/the-search-for-en-passant-checkmates/</link>
<pubDate>Wed, 26 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/the-search-for-en-passant-checkmates/</guid>
<guid>http://localhost:1313/the-search-for-en-passant-checkmates/</guid>
<description>&lt;p&gt;The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.&lt;/p&gt;
&lt;p&gt;First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn&amp;rsquo;t think of any obvious way to get completely random players on the site, I used the API&amp;rsquo;s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -&amp;gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_archive_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;titled_urls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
@ -1394,7 +1633,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;https://api.chess.com/pub/titled/WGM&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here&amp;rsquo;s a taster of what the list looks like printed to a terminal - lots of possiblities.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/output.webp&#34; alt=&#34;image alt text&#34;&gt;&lt;/p&gt;
</description>
</item>
@ -1402,10 +1641,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Declarative firefox config with home-manager on nixos</title>
<link>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</link>
<link>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</link>
<pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<guid>http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/</guid>
<description>&lt;p&gt;As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found &lt;a href=&#34;https://github.com/misterio77/nix-starter-configs&#34;&gt;this&lt;/a&gt; friendly githubber&amp;rsquo;s templates to be very helpful.&lt;/p&gt;
&lt;p&gt;First of all you&amp;rsquo;ll need to enable firefox with &lt;code&gt;programs.firefox.enable = true;&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;extensions&#34;&gt;EXTENSIONS&lt;/h3&gt;
@ -1468,10 +1707,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Upgrade your qtile setup with a cute dropdown terminal</title>
<link>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<link>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<guid>http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/</guid>
<description>&lt;p&gt;I didn&amp;rsquo;t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;libqtile.config&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Dropdown&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Scratchpad&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
@ -1488,7 +1727,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;Though this can easily be altered with the x, y, height, and width keys:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;groups&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;append&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;ScratchPad&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;scratchpad&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
@ -1504,7 +1743,7 @@ After moving across most of my stuff I came across the problem of how to hook th
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This gives us a little boxy guy in the top left corner:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://nonsense.dymc.win/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;http://localhost:1313/image/dropdown2.webp&#34; alt=&#34;alt&#34;&gt;&lt;/p&gt;
&lt;p&gt;We also have the option to set keybindings to toggle the appearance of the window. I&amp;rsquo;ve got this in my config.py now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;keys&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shift&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Return&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
@ -1520,10 +1759,10 @@ After moving across most of my stuff I came across the problem of how to hook th
<item>
<title>Rudimentary local scrobbling with bash</title>
<link>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</link>
<link>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</link>
<pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/</guid>
<guid>http://localhost:1313/rudimentary-local-scrobbling-with-bash/</guid>
<description>&lt;p&gt;There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I&amp;rsquo;ll be talking specifically about my setup for recording the albums I&amp;rsquo;ve been listening to.&lt;/p&gt;
&lt;h3 id=&#34;lets-get-down-to-business&#34;&gt;LET&amp;rsquo;S GET DOWN TO BUSINESS&lt;/h3&gt;
&lt;p&gt;Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I&amp;rsquo;m playing the classic album Lemonade by Beyonce it would look like this:&lt;/p&gt;

View file

@ -1,86 +1,49 @@
<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://nonsense.dymc.win/favicon.ico">
<link rel="alternate" type="application/rss+xml" href="https://nonsense.dymc.win/tags/tailscale/index.xml" title="James' Blog">
<link id="stylesheet" rel="stylesheet" href="/css/light.css">
<html lang="en"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://localhost:1313/tags/tailscale/" />
<title>Tailscale - James&#39; Blog</title>
<link rel="canonical" href="https://nonsense.dymc.win/tags/tailscale/" />
<title>Tailscale</title>
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/tags/tailscale/index.xml" title="James' Blog">
<link rel="stylesheet" href="/css/style.css">
<script>
document.documentElement.setAttribute('data-theme', 'dark');
</script>
</head>
<body><header id="banner">
<nav class="navbar">
<body><header class="site-header">
<nav>
<a href="http://localhost:1313/" class="home">~</a>
<div class="nav-links">
<a href="https://nonsense.dymc.win/" class="home">🏠</a>
<a
href="/info/"
title="👋"
>👋</a
><a
href="/search/"
title="🔎"
>🔎</a
>
<button id="toggle-button" class="toggle-button" onclick="toggleTheme()">🌚</button>
<a href="/search">/</a>
</div>
</nav>
</header>
<main id="content">
<a href="/wuthering-heights-2026/">Wuthering Heights (2026)</a>
<a href="/handy-script-for-a-more-zen-twitch-experience/">Handy script for a more zen twitch experience</a>
<a href="/over-engineered-nixos-blog-deployment-setup/">Over-engineered (?) nixos blog deployment setup</a>
<a href="/so-you-want-to-write-a-neovim-plugin-with-lua/">So you want to write a neovim plugin with lua</a>
<a href="/making-nix-colors-talk-to-neovim/">Making nix-colors talk to neovim</a>
<a href="/vanilla-javascript-theme-toggle-for-simpletons/">Vanilla javascript theme toggle for simpletons</a>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
<a href="/learning-about-qtile-widgets-with-cricket/">Learning about qtile widgets with cricket</a>
<a href="/achieve-peak-rice-with-nix-colors/">Achieve peak rice with nix-colors</a>
<a href="/translating-docker-to-nix/">Translating docker to nix?!</a>
<a href="/simple-nixos-config-for-vps-static-site/">Simple nixos config for vps static site</a>
<a href="/python-podcast-scripting/">Python podcast scripting</a>
<a href="/bread-dough-for-lazy-boys/">Bread dough for lazy boys</a>
<a href="/multi-user-qtile-fiddling/">Multi user qtile fiddling</a>
<a href="/teeny-tiny-bash-fetch-script/">Teeny tiny bash fetch script</a>
<a href="/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journalling-script/">Get the thoughts out of your head and into a digital format with this python journalling script</a>
<a href="/lowkey-emacs-setup-bits-and-bobs/">Lowkey emacs setup bits and bobs</a>
<a href="/the-search-for-en-passant-checkmates-2-electric-boogaloo/">The search for en passant checkmates 2: Electric Boogaloo</a>
<a href="/the-search-for-en-passant-checkmates/">The search for en passant checkmates</a>
<a href="/declarative-firefox-config-with-home-manager-on-nixos/">Declarative firefox config with home-manager on nixos</a>
<a href="/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/">Upgrade your qtile setup with a cute dropdown terminal</a>
<a href="/rudimentary-local-scrobbling-with-bash/">Rudimentary local scrobbling with bash</a>
</main>
<footer id="footer">
<small>
made with <a href="https://gohugo.io">hugo</a>
</small>
<main id="content">
<h1>Tags</h1>
<ul class="post-list">
<script src="/js/search.js"></script>
<script src="/js/toggle.js"></script>
<li>
<time>Sep 12, 2023</time>
<a href="/nginx-reverse-proxy-with-ssl-for-services-running-on-tailscale/">nginx reverse-proxy with SSL for services running on tailscale!</a>
</li>
<li>
<time>May 16, 2023</time>
<a href="/tailscale-caddy-and-nixos-containers/">Tailscale, caddy, and nixos containers</a>
</li>
</ul>
</main><footer class="site-footer">
<small>
<a href="/index.xml">RSS</a>
·
<a href="https://gohugo.io">Hugo</a>
</small>
<script src="/js/script.js"></script>
</footer>
</body>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show more