Johan Eliasson

Tech, space, games and random stuff

Settling into NixOS

Earlier this year, I decided it was time for a change in my setup. After a year on Linux Mint with i3, things were solid but starting to show cracks. Gaming was better than ever thanks to Proton, but Xorg wasn’t cutting it. My Ansible-managed dotfiles repo was working, but the workstations were slowly drifting out of sync. Apt was still rock solid, but packages were often outdated or missing entirely. Arch Linux vs NixOS: Arch had the hype, the rolling updates, the endless tinkering. NixOS had the reproducibility, the rebuilds, the peace of mind. I knew which side of that fight I wanted to be on - and my love for declarative setups made NixOS the obvious pick. ...

Hello, World!

With the switch to Hugo, I wanted a place to test the syntax highlighting that comes with Chroma. This is that place, and we’ll use the classic “Hello, World!” example in various computer languages I have used in one way or another, past or present. Of course, let’s over-engineer it by having some pipelines do the output. Languages Ansible - hosts: localhost tasks: - debug: msg: "Hello, World!" Bash #!/bin/env bash echo "Hello, World!" Batch @echo off echo Hello, World! C #include <stdio.h> int main(void) { printf("Hello, World!\n"); } C++ #include <iostream> int main() { std::cout << "Hello, World!\n"; } C# using System; class Program { static void Main() { Console.WriteLine("Hello, World!"); } } CSS body::before { content: 'Hello, World!'; display: block; } Dockerfile FROM alpine CMD ["/bin/sh", "-c", "echo Hello, World!"] HTML <!DOCTYPE html> Hello, World! Go package main import "fmt" func main() { fmt.Println("Hello, World!") } Java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } JavaScript console.log('Hello, World!'); PHP <?php echo 'Hello, World!'; PowerShell Write-Host "Hello, World!" Python print('Hello, World!') SQL SELECT 'Hello, World!'; TypeScript console.log('Hello, World!'); Terraform output "greeting" { description = "Prints 'Hello, World!'" value = "Hello, World!" }

New look and feel

I originally built this site using Astro, which worked well… until it didn’t. When I finally got around to writing a new post, the deployment pipeline failed due to breaking dependencies. A quick upgrade to the latest major version didn’t go as planned, and instead of wrestling with it, I decided to switch to something simpler. Enter Hugo — a pure static site generator known for its speed, simplicity, and minimal dependencies. While migrating, I also created a custom theme based on PaperMod. Say hello to term, a lightweight, terminal-inspired design that keeps things clean and minimal. ...

Creating a npm package to extend husky

A couple of months ago I stumbled upon the npm package husky. It provides a way to hook into various git hooks and brings some nice opportunities in improving DX. After having husky and a few hooks in some various git projects, I thought it would be a fun mini project to make these hooks into a separate npm package: @jeliasson/husky-hooks was created. This npm package aims to increase the developer experience and consistency by providing a set of hooks that can be opted-in the development lifecycle. It depends on husky for pre-commit and pre-push hooks, and a few other zero/low dependency packages. ...

RedwoodJS on Kubernetes

After seeing some posts about self-hosting on Heroku and Render I got inspired and decided to take a swing at writing about Self-hosting RedwoodJS on Kubernetes. If you are a serverfull person who likes to get your hands dirty with Docker, Kubernetes with GitHub Actions - this read might be just for you. Heads-up though; It’s quite a lot of config. 🤓 Also; while this is a working implementation that currently supports a production application (maybe a future #show-tell), it leaves some decisions to make on your part. That being said, let me know if you want me to elaborate on some topics and I’m definitely down to make this implementation better. ...