Project Setup Made Simple
I’m regularly starting projects in old and new Programming Languages, with old and new tools, and in old and new frameworks.
And it used to be the case that just setting the damn thing up took me already ages.
Since Progress Happens In Jumps, there have been a few big jumps along the way.
- Using Linux: Basically all the interesting software development happens on Linux, so READMEs are geared towards that.
- Reproducibility, Part #1: Using Docker whenever possible. This definitely adds complexity, but makes everything way more reproducible. Runs on my machine-type errors should be few now.
- Reproducibility, Part #2: Enter Nix(OS)—remove the complexity Docker added, but replace it with learning a whole ecosystem whose good part of the documentation isn’t properly indexed/available by Google.
- Uniformity: All my flakes use flake.parts.
- Speed, Part #1 | Setup: Setting everything up with Nix Flakes is fine, but it’s tedious to write them by hand in the beginning of every project. Enter Flake Templates:
Nix Flakes can define a template folder output that then gets copied to whereever you want. When you want to start a new project (Pollen, in this case), you can just do this:Terminal window mkdir pollen-projectcd pollen-projectnix flake init --template github:haglobah/flakes#pollen - Speed, Part #2 | Development: Writing and maintaining those Flake Templates, however, is a pain in the ass.
Flake Templates just aren’t made for the usecase I’m trying to use them for. Which is why I wrote a new, small utility that just works: Templater.