I can understand not using Nix, but please take a look at how we've solved some of these problems, and our mistakes. There is no need to reinvent the wheel blindly. Feel free to reach out if interested.
340 karma · joined October 21, 2013
I can understand not using Nix, but please take a look at how we've solved some of these problems, and our mistakes. There is no need to reinvent the wheel blindly. Feel free to reach out if interested.
More seriously, a metacircular example to draw from would be: https://github.com/kragen/stoneknifeforth
Nix + GDAL + GNUParallel + autoscaling groups === massive geospatial data processing pipeline
- build in CI
- push to a cache (eg: S3-compatible/HTTPS/SSH)
- use the cache elsewhere
In that paradigm, the artifacts live in the binary cache (sometimes called substituter), much like container images live in a registry. This raises the question of if or how to track precise artifacts in use. There is no standard for this yet. I've seen people use tags, branches, separate repos with manifests, DNS TXT records, etc. [ I work for https://floxdev.com/ where we are creating a standard for artifact lifecycle management and distribution called the Catalog into which you publish your artifacts, contact us if interested ].
The key selling point is that the resulting artifacts often have high de-duplication compared to container layers and have good correctness/completeness properties. We also can keep track of how things are built, so SBOM and supply chain information is very good.
I guess it's just that people would feel bad going *last*? Psychology is weird - but powerful.
Can you build/test/run your organization's software from 5 days/months/years ago - across multiple platforms, systems, and ecosystems - reliably?
Can you develop, build, manage, and maintain your software without fear?
Do you want a system do the bookkeeping for proper software dependency management? Or do you want people to do it by hand?
Do you want a declarative system, or try to remember and keep track of all the changes you've ever made by hand?
You don't get these things for free, but if you value them, then Nix is the tool for you. Or at least learn about it so that you can learn from the decades of accumulated knowledge.
next 30 seconds: I can confidently compile and run multiple incompatible versions of software simultaneously. I can build projects from years ago. I can package large projects from different ecosystems (python 2/3, c/c++, go, Javascript, Octave, Rust) and be confident they will not interfere with each other. I can try bleeding edge software with no risk to it interfering with my system. It is faster and less hassle than juggling various Docker containers and VMs. It protects me from dependency hell. Using Nix to manage an operating system (ie: NixOS) then gives me those benefits for my entire machine. Then I get even more benefits when using Nix on any other (not even necessarily NixOS) machine by pushing around package closures and managing a simple binary cache.
But overall: it makes me more productive. It is my secret weapon to manage the complexity of software development. The benefit is not on day 1, but on day 100 and day 1000.
I’m not sure what golden standard we are comparing this to. It is not perfect, but I’d say this is a far more solid bedrock upon which to build software than anything else I’ve encountered.
More frankly, “best” is very subjective and you should find a passion or topic or task you are already interested and use that to guide your decision.
For example; people seem to have accepted that the benefits of using terraform in spite of various difficulties - the learning of its language or needing to hire specialists. The mantra of "infrastructure as code" is enough to drive adoption. What is our mantra? We need to accept that "reproducibility" isn't quite working and that we need either a clearer message, or to explain the message.
(disclaimer: i was on the Defense Digital Service team)
It seems this is where a better description of what NixOS (and it's module system) is. My suspicion is that by starting with NixOS it is harder to be introduced to the simpler concepts. It is best to think of the NixOS modules as a domain-specific-language on top of Nixpkgs which is itself a large set of conventions on top of the fairly simple Nix language. I think people should be introduced from the bottom up.
> having systemd manage a StateDirectory and creating the unit file/Nomad conf in configuration.nix for the machine
Seems like you did get what you needed working; my best advice to understand that the key abstraction being created is the activation script. Perhaps we never clearly describe all of its moving parts and how it works?
> ... but they are NOT functional programming enthusiasts
I believe the key is for the Nix community messaging/marketing to focus less on the theoretical elegance and more on the practical benefits.
2) We're working on stabilization... just asking for a bit of patience.
1. What were the drivers and motivators for you to try Nix? What did you hope to achieve?
2. Was the current experimental status of the new nix CLI and flakes the primary cause of the confusion?
We're always looking for better ways to tell this story; what would be a good way to demonstrate this value? what is a quick demo that would convey the message?
There has also been sharing of ideas and collaboration between things us and bazel/buck/spack/etc. I think it is clear that we are all moving towards a similar end state, that often looks very much like Nix, or a re-invention of it.
For things like OCI, Nix predates it, but we should start to re-use the standard. The Tvix group is exploring this and I'd suspect our sandboxing will be OCI at some point. For outputs; we make it easy to convert a Nix package into an equivalent container. Things like flatpack,AppImage,Snap should also be easy for people to output (i'm trying to collect these "transformers"/"bundlers" here: https://github.com/NixOS/bundlers).