shell.nix files for a couple projects at work – a front-end Vue app and a back-end Rails API it works with – using
mkShell so we can easily spin up their dev environments.
We have an internal CLI (built and maintained in-house) that’s useful for deploying our apps. I wrote a Nix derivation for it so I could install it on NixOS.
It would be nice if our apps’ dev environments included the CLI.
The derivation currently lives in an overlay in my nixos config, so I need to give it a proper home.
There are three approaches I can think of:
- Add the CLI derivation to the CLI’s own repo.
- Create a repo for in-house overlays (similar to nixpkgs-mozilla).
- Create a fork of nixpkgs to hold our in-house derivations.
Option 1 is appealing because it seems simple. I suspect it would also make it easy to spin up a dev environment for the CLI itself when we want to hack on that.
Option 2 would provide a central location for in-house Nix derivations, but I’m not sure that makes sense given that I’m already putting
shell.nix files directly in the other projects. Of course, in those projects the aim was to spin up a dev environment, rather than to provide an installable package, so maybe there’s a hybrid approach that makes sense. I do like overlays…
Option 3 seems simple in some ways, but I don’t like the idea of maintaining a fork of nixpkgs. I could be wrong, but my gut tells me this would be an unpleasant approach.
What do you think would be a good solution?