Why NixOS didn't work out for me as a web developer
As a software developer, you are required to install many programs from
different sources because of the projects you have to run on your computer.
NixOS doesn’t have the ability to run binaries that weren’t compiled to NixOS
which makes it difficult for you to run programs like wrangler, biome,
composer or any other pre-compiled binary that comes as a project dependency.
This forces you to build those dependencies from source instead, which brings
another problem: disk space. Some of these programs have to be compiled from
source and the build dependencies occupy disk space that could be used for OS
updates. I ran out of disk space every time I had to update my system, which
forced me to change how I arrange my disks in order to have an entire SSD
dedicated to the OS. Some packages take up to two hours to build like
wrangler, steam, and sonarlint-ls, which, to be honest, I don’t have the
time or disk space for it.
Why is it necessary to build wrangler from source? Well, I can’t simply run
wrangler from vendorized projects because of this error:
Could not start dynamically linked executable: /home/user/dev/codeberg/zetsu-api/node_modules/@cloudflare/workerd-linux-64/bin/workerd
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
Does building from source at least save you some disk space for the system-wide
wrangler? Not really. The package dependencies can take up to 4 gigabytes
which prevents me from updating the system anyway. Plus, I can’t really refrain
from installing wrangler in my software projects because it’s not a good
practice to use a different version than the one described in your project’s
lock file.
So yeah, NixOS does not work out for a software developer like me. The OS gets in my way and doesn’t make my life necessarily easier. I know you can modify the program’s ELF header to include paths to libraries using autopatchelfhook, but at this point, NixOS is a solution for me.
The solution
I moved from NixOS to an imperative OS, more specifically: Fedora and Void
Linux. All my computers now run an imperative OS depending on its necessity, if
it’s for software development, Void to the rescue, if it’s for my family usage,
Fedora with the Gnome desktop. I chose Void for my development PC because it has
command-line programs that aren’t packaged in Fedora like cmus, neovide and
lua-language-server.