11 karma · joined March 1, 2023
https://nixos.wiki/wiki/Flakes
https://tonyfinn.com/blog/nix-from-first-principles-flake-ed...
The second link appears to be down at the moment so check back later.
I think the most common use case is as a build system, but in this context you aren't limited to building packages, you can also build "environments". By "environments" I mean a shell with certain packages available in `$PATH`. You would use Nix like other build systems in the sense that you specify the build requirements (which other packages, libraries, etc you need to build _your_ stuff), then you specify how exactly to build your stuff. Here "stuff" could be as little as a shell script or as much a huge monorepo.
There are ways to use Nix like you would use Ansible or Terraform, but I wouldn't say that's the mainstream use case of Nix.