Packaging python app with poetry2nix using nix flakes

Background I have some backup logs that have failures I wanted to search and recently came across toolong but it is not currently in nixpkgs. I figured this is a good chance to try out poetry2nix I keep reading about and went through the process of packaging this so I could use it easily with nix.



Diffing contents of docker containers

Recently I worked on a project where a large refactor had taken place but I wanted to ensure that there was no changes to the built output of the docker container. So while the diff in Github was quite large with many files moved around the output should remain almost identical aside from a few extra files removed.


Export PDFs to PNGs

Ever want to convert a Google Slides presentation to images without having to save each one manually?

  1. Export from Google Slides to PDF. File > Download > PDF This will let us download all the images at once.
  2. Using the imagemagickBig nix package or installing with instructions from here you can then run the following command in the CLI:

convert -density 300 -quality 100 my-download.{pdf,png}

This will then convert the PDF to a series of images at 300 DPI.

fish shell script for quick access: pdf-to-png ./my-pdf-file.pdf



Nix flake hostname troubleshooting

Have you seen this error?

building the system configuration...
error: flake 'git+file:///Users/matt/nixfiles' does not provide attribute 'packages.aarch64-darwin.darwinConfigurations.Bebop.system', 'legacyPackages.aarch64-darwin.darwinConfigurations.Bebop.system' or 'darwinConfigurations.Bebop.system'

I ran into this and it took me about a month before I realized that I had changed my hostname and that is why my nix flake was no longer building.


Nix flakes for development

Background: I had some projects from school that I wanted to revisit and compile again, specifically a game called Worm. This was an assignment that needed to be linked against ncurses which isn’t installed out of the box on most machines. I’ve been dual booting NixOS for some time now on my gaming PC and I thought it was time to start using Nix Flakes with my own projects.


Cross compiling Go for Winkhub

How I cross compiled Go to run on the Winkhub and installed a custom web app to control the lights locally.

TL;DR; Be sure to compile with Go 1.5 with the following settings:
GOOS=linux GOARCH=arm GOARM=5 go build .



Hacking the Winkhub

How I liberated my Winkhub from the Cloud

TL;DR; I rooted my Winkhub over the UART connection and then wrote a small Go web service to allow me to turn my lights on and off from my phone.