I’ve been using WSL for a long time — it’s a convenient way to get a real Linux environment on Windows without giving up the rest of the desktop. For a while I was happy enough running Ubuntu, but the more time I spent in the Nix ecosystem, the more I wanted my WSL setup to be declarative too. No more “I think I installed that with apt at some point.” No more mystery dotfiles that I’d forgotten I’d manually edited. Just a config file that describes the entire system, and a single command to rebuild it.
This post walks through setting up NixOS in WSL from scratch using the
community-maintained NixOS-WSL
project, configuring your user, learning the basics of configuration.nix, and
adding Home Manager for per-user dotfile management. I’ll also give you a brief
look at flakes and point you toward where to go next. Fair warning: the initial
setup takes a bit of work, but once (if) it clicks, you’ll wonder how you lived
without it.
After getting a basic 3DS development environment set up in a previous post, I wanted to push things a bit further. The standard approach for 3DS homebrew is C or C++, which works fine, but I had been curious whether Nim — a statically typed, compiled language that transpiles to C — could be a practical alternative. Nim’s syntax is clean, it has a solid FFI story for calling into C libraries, and it compiles down to native code through the same C toolchain devkitPro already provides. It seemed like a natural fit.
This post covers how I got a Nim project cross-compiling to the 3DS, wrote FFI bindings for libctru, and built a small demo that exercises most of the major subsystems. Fair warning: this is more involved than the previous post, and a fair amount of it was trial and error.
I’ve recently become interested in developing for hardware outside my comfort zone. I got my hands on a Nintendo 2DS, and figured this would be a good opportunity to delve into homebrew development. Getting a custom firmware running on the device was quite straight forward, but information for actually setting up a development environemnt seems to be scattered across various forum posts.
This is mostly a collection of notes for my own sake, put out into the ether in the off chance it’s useful to someone else.