I have not used NixOS, but heavily use their package manager at work. In the package manager context, there are two big benefits:
- You can have directory specific environments. For example, with direvn once you 'cd foo' you can magically have a JDK, go installed that doesn't impact the rest of your system
- By putting flake into your repo you can guarantee that each developer will have the same environment
Glancing at NixOS, it looks like it follows the same pattern but at the OS layer. If you like declarative configuration that could be an upside. The bigger upside would come if you have multiple machines that you want to behave the same.