Hacker News new | ask | show | jobs
by takeda 2205 days ago
Because Nix is a language there are many ways of accomplishing the same thing. Some ways are easier, some require more work. For example if you make a derivation in your home, it is easy to install it with nix-env from there, and you are done, but if you want to include it in your configuration, you typically would create an overlay that includes your package in nixpkgs. Then you can list the package. If your derivation requires creating a configuration, service etc. On top of that you will also need to create module that specifies configuration options and configures the application.

So in many cases you are told to use nix-env, because the person just answered how to write a derivation and didn't go further than that.

I think flakes (still work in progress), will help here, because it defines a standard that supposed to do all of that in one file that is easily composable.