Sean Murphy

Sean Murphy

gopaddy.ch - Sean's home on the internet...

Adding a package and service to NixOS using flakes

One of the advantages of nix flakes is the ability to quite arbitrarily compose flakes in different ways to obtain consistent, reproducible environments comprising disparate applications and tools. However, using flakes to add new packages and modules to NixOS is not very well documented. Here, I describe how I added a simple package and service to my NixOS configuration with a flake. More specifically, I describe how to add a simple go application which implements a REST API and associated systemd service to a NixOS configuration - the idea was to focus specifically on a package which is not available within nixpkgs and address the issue of how to add it via a flake.

Deploy an Elm Frontend to Cloudflare Pages

While experimenting with the Cloudflare platform, I wrote a small Elm frontend which gets some data from a Workers hosted backend and renders it. This was very much a toy project to understand how these tools can fit together. Here I describe how I deployed this Elm frontend to Cloudflare Pages. (In an earlier incarnation of the work, I served HTMX from the Workers based backend, but this had issues serving go-echarts based content and ultimately I felt this solution resulted in a very unclear frontend/backend distinction; for this reason, I started looking at a dedicated Elm frontend).

Building Container Images using Nix and Github Actions

I spent a little time investigating building container images with nix which contain python applications or python environments; I wanted to put this build process into a github action. I found a few posts which partially cover this: Mitchell Hashimoto has a post on creating a container image for a simple flask application using poetry2nix and the nix `dockerTools`` module; fasterthanlime has a post which goes into extensive detail on building a container image to support a service written in rust; thewagner has a post on building container images to serve static content via python and the accompanying github repo contains a github action to perform a container image build whenever there is a push to the repo.

Building CUDA images on github runners with nix

In a previous post, I described how I set up github runners which could build standard docker images via github actions — I focused on a nix based solution both for the github runner and the container build. In this post, I describe how I extended that scenario to support building container images requiring CUDA. The content relating to this post is in this git repo. Enabling the kernel drivers in NixOSFor this to work, it was necessary to enable the nvidia kernel drivers in NixOS.

Building an OpenAPI compatible API for Cloudflare Workers in Go

In this post, I describe how I built a simple test API in Go and deployed it to Cloudflare Workers. I really like the Cloudflare Workers platform and was interested to understand how to do this. It’s worth noting that Go is currently not officially supported by Cloudflare, although the Workers do run WASM so it is possible to run Go code on the workers by compiling it to WASM. The test API developed here supports a few simple operations relating to managing results for running events.
0%