From 531029a18feddff6aa633d049fa8db18f1596484 Mon Sep 17 00:00:00 2001
From: ryfrd 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: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered home-manager 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. 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: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered home-manager 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. Nix-colors 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! This will be a quick rundown of how I’ve got things set up; this is basically just a rehash of this. That’s it for today. Thank you to the hero that made this.uhoh 404 :/
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..a2f1f55
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,9 @@
+
+
+ {{- partial "head.html" . -}}
+
+ {{- partial "header.html" . -}}
+ {{ .Title }}
+
+ {{ range where site.RegularPages "Type" "in" site.Params.mainSections }}
+
diff --git a/layouts/partials/search.html b/layouts/partials/search.html
new file mode 100644
index 0000000..4472006
--- /dev/null
+++ b/layouts/partials/search.html
@@ -0,0 +1 @@
+
diff --git a/public/404.html b/public/404.html
index b142951..d8fa191 100644
--- a/public/404.html
+++ b/public/404.html
@@ -1,2 +1 @@
-uhoh
-404
+uhoh 404 :/
diff --git a/public/theming-nirvana/index.html b/public/achieve-peak-rice-with-nix-colors/index.html
similarity index 89%
rename from public/theming-nirvana/index.html
rename to public/achieve-peak-rice-with-nix-colors/index.html
index 10e7572..3b262d5 100644
--- a/public/theming-nirvana/index.html
+++ b/public/achieve-peak-rice-with-nix-colors/index.html
@@ -1,33 +1,40 @@
-
-
+
+
-
-
-
+
+
-
- James' Blog :-)
-
+
theming nirvana
- Achieve peak rice with nix-colors
+ how to make it work
Not necessarily faster than the old rsync method but it’s pretty damn declarative, that’s for sure.
- -made with hugo and my bastardised version of this nice theme
+ + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +made with hugo and my bastardised version of this nice theme
+Rudimentary local scrobbling with bash + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’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:
+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 ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’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:
Of course this slightly ramshackle approach is certainly not for everyone lol but as it stands it’s working quite nicely for me. Lots of love and happy listening :)
made with hugo and my bastardised version of this nice theme
+ + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +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’ll be talking specifically about my setup for recording the albums I’ve been listening to.
+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’ll be talking specifically about my setup for recording the albums I’ve been listening to.
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’m playing the classic album Lemonade by Beyonce it would look like this:
/home/randy/music/Beyonce/Lemonade/
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.
Finally, disclaimer: I am a bash amateur so I hope nothing you’ve seen here was too upsetting. Lots of love x
made with hugo and my bastardised version of this nice theme
+ + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +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’ve just run something like hugo new site lovely-new-website, entered the new directory with cd lovely-new-website and you’ve got a selection of mostly empty directories looking something like this.
.
-├── archetypes
-│ └── default.md
-├── config.toml
-├── content
-├── data
-├── layouts
-├── public
-├── static
-└── themes
-Our first concern will be getting a barebones theme template that can be customised to our liking. I would recommend this guy which I used to get up and running. You could also check out my theme which I’m using on this site that is also very simple (as you can probably see from the website lol). Once you’ve got a theme with (I’m using mine as an example) git clone https://gitlab.com/robbygozzarder/mcl and placed it in the themes directory you’ll need to adjust your config.toml file to point it to this theme.
theme="mcl"
-The directory structure of your new theme will look something like this:
-.
-└── mcl
- ├── archetypes
- │ └── default.md
- ├── layouts
- │ ├── 404.html
- │ ├── _default
- │ │ ├── list.html
- │ │ └── single.html
- │ ├── index.html
- │ └── partials
- │ ├── footer.html
- │ ├── header.html
- │ └── nav.html
- ├── README.md
- └── static
- └── css
- └── style.css
-This is where most of the magic happens:
-Now the theme is sorted the next three things you need to know anything about (imho) are the content, public, and static directories:
-Now we’ve got the directory what’s happening where admin out the way let’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:
-{{ partial "header.html" . }}
-
-<p>This is mainly a place for me to document various
-bits and bobs I've been doing on my computers.
-I am a noob in most things so take anything written
-here with a pinch of salt. Lots of love :)</p>
-
-{{ .Content }}
-{{ range .Site.RegularPages | first 5 }}
- <h3> <a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
- {{ .Summary }}
- <br><br>
- {{ .Date.Format "06 Jan, 2006" }} |
- {{ .WordCount }} words |
- {{ .ReadingTime }} mins |
-
- {{ range (.GetTerms "tags") }}
- <a href='{{ .Permalink }}'>{{ .LinkTitle }}</a>
- {{ end }}
-
-{{ end }}
-
-{{ partial "footer.html" . }}
-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’m going to end on this cliffhanger but if you want to know more about the curly brackets check out the hugo docs here.
-made with hugo and my bastardised version of this nice theme
-Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’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.
+Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’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.
I’m going to go through a bit of the nixos config I’ve got for my vps.
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.
@@ -77,9 +84,18 @@ };This means I can just rsync the updated site from my laptop to the server and it’ll be updated within the hour. Good enough for me.
made with hugo and my bastardised version of this nice theme
+ + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +I’ve recently been messing around with writing neovim plugins.
+ So you want to write a neovim plugin with lua
+
I’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’s the official neovim docs 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.
@@ -94,9 +101,18 @@ As a little coda, this is how you can use your fancy new plugin using })
Hope you’ve enjoyed.
made with hugo and my bastardised version of this nice theme
+ + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + + +made with hugo and my bastardised version of this nice theme
+Making nix-colors talk to neovim + +Vanilla javascript theme toggle for simpletons + +Tailscale, caddy, and nixos containers + +Learning about qtile widgets with cricket + +Achieve peak rice with nix-colors + +Translating docker to nix?! + +Simple nixos config for vps static site + +Python podcast scripting + +Bread dough for lazy boys + +Multi user qtile fiddling + +Teeny tiny bash fetch script + +Get the thoughts out of your head and into a digital format with this python journalling script + +Lowkey emacs setup bits and bobs + +The search for en passant checkmates 2: Electric Boogaloo + +The search for en passant checkmates + +Declarative firefox config with home-manager on nixos + +Upgrade your qtile setup with a cute dropdown terminal + +Rudimentary local scrobbling with bash + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +made with hugo and my bastardised version of this nice theme
+So you want to write a neovim plugin with lua + +Making nix-colors talk to neovim + +Vanilla javascript theme toggle for simpletons + +Tailscale, caddy, and nixos containers + +Learning about qtile widgets with cricket + +Achieve peak rice with nix-colors + +Translating docker to nix?! + +Simple nixos config for vps static site + +Python podcast scripting + +Bread dough for lazy boys + +Multi user qtile fiddling + +Teeny tiny bash fetch script + +Get the thoughts out of your head and into a digital format with this python journalling script + +Lowkey emacs setup bits and bobs + +The search for en passant checkmates 2: Electric Boogaloo + +The search for en passant checkmates + +Declarative firefox config with home-manager on nixos + +Upgrade your qtile setup with a cute dropdown terminal + +Rudimentary local scrobbling with bash + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +made with hugo and my bastardised version of this nice theme
+Making nix-colors talk to neovim + +Vanilla javascript theme toggle for simpletons + +Tailscale, caddy, and nixos containers + +Learning about qtile widgets with cricket + +Achieve peak rice with nix-colors + +Translating docker to nix?! + +Simple nixos config for vps static site + +Python podcast scripting + +Bread dough for lazy boys + +Multi user qtile fiddling + +Teeny tiny bash fetch script + +Get the thoughts out of your head and into a digital format with this python journalling script + +Lowkey emacs setup bits and bobs + +The search for en passant checkmates 2: Electric Boogaloo + +The search for en passant checkmates + +Declarative firefox config with home-manager on nixos + +Upgrade your qtile setup with a cute dropdown terminal + +Rudimentary local scrobbling with bash + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +made with hugo and my bastardised version of this nice theme
+So you want to write a neovim plugin with lua + +Making nix-colors talk to neovim + +Vanilla javascript theme toggle for simpletons + +Tailscale, caddy, and nixos containers + +Learning about qtile widgets with cricket + +Achieve peak rice with nix-colors + +Translating docker to nix?! + +Simple nixos config for vps static site + +Python podcast scripting + +Bread dough for lazy boys + +Multi user qtile fiddling + +Teeny tiny bash fetch script + +Get the thoughts out of your head and into a digital format with this python journalling script + +Lowkey emacs setup bits and bobs + +The search for en passant checkmates 2: Electric Boogaloo + +The search for en passant checkmates + +Declarative firefox config with home-manager on nixos + +Upgrade your qtile setup with a cute dropdown terminal + +Rudimentary local scrobbling with bash + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +made with hugo and my bastardised version of this nice theme
+So you want to write a neovim plugin with lua + +Making nix-colors talk to neovim + +Vanilla javascript theme toggle for simpletons + +Tailscale, caddy, and nixos containers + +Learning about qtile widgets with cricket + +Achieve peak rice with nix-colors + +Translating docker to nix?! + +Simple nixos config for vps static site + +Python podcast scripting + +Bread dough for lazy boys + +Multi user qtile fiddling + +Teeny tiny bash fetch script + +Get the thoughts out of your head and into a digital format with this python journalling script + +Lowkey emacs setup bits and bobs + +The search for en passant checkmates 2: Electric Boogaloo + +The search for en passant checkmates + +Declarative firefox config with home-manager on nixos + +Upgrade your qtile setup with a cute dropdown terminal + +Rudimentary local scrobbling with bash + + +-----------------
+ + made with hugo and my bastardised version of + this nice theme + + + +