Per Project Packages using Nix and direnv

Why have project specific packages? There are a few reasons why you would want to have project specific packages. Different package versions per project e.g. you are maintaining a project that uses an old version of Node.js (like this blog, I’m lazy), but use a newer version globally on your system. You don’t want to pollute your global environment with packages you’ll only use in an isolated project e.g. nixfmt to format *....

May 3, 2021 · 3 min · 492 words · Rameez Khan

Emacs Native-Comp on WSL2 with Nix

Update: As of 2021-04-25 GCC/Native-Comp has been merged into master. I’m sure package managers will be updated soon. What is Emacs Native-Comp? Emacs Native-Comp refers a to the feature/native-comp branch of Emacs. It adds support for compiling EmacsLisp to native code using libgccjit. This provides a notable performance improvement right out of the box. See here for more details. Installing using Nix on WSL2 Note: All instructions below are sourced from this gist....

April 26, 2021 · 2 min · 262 words · Rameez Khan

Nix as a potential Linuxbrew replacement?

Linuxbrew Coming from a MacBook, I became comfortable with Homebrew as a package manager. Over time, I built up a collection of tools in my dotfiles to maximise my productivity. When moving over to Ubuntu, I realized a couple of these tools were missing from Apt. Naturally I went with something I was most comfortable with, in this case, Linuxbrew. Linuxbrew works. It’s just your normal Homebrew on Linux. On the rare occasion, you’ll find an unsupported package....

April 21, 2021 · 3 min · 446 words · Rameez Khan

Goodbye pyenv and nvm. Hello ASDF.

pyenv and nvm I maintain several side-projects, most of which are either Python or Node.js. For the longest time I used pyenv and nvm to manage different versions of Python and Node.js respectively. The configuration to manage these would be added to my dotfiles. Over time, my shell (zsh) startup times increased significantly to the point where it took roughly 3 seconds. I spend most of my life at the terminal, so this was insufferable....

October 9, 2020 · 2 min · 288 words · Rameez Khan

Tunneling via Kubernetes

For security reasons, you might find your database (or any service for that matter) in an internal subnet, somewhere in the cloud. Accessing this for local debugging/development can be a pain. Using Kubernetes (assuming you have a cluster already), you can use this to your advantage. Create the tunnel What you need: Kubernetes (with API access via kubectl ofcourse) An image with netcat installed (Nice opportunity to punt mine 😉) tcpserver (should come with any Debian based distro) Next, ensure your pod is running....

October 2, 2020 · 2 min · 225 words · Rameez Khan