Nix


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.


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.