I still need to give NixOS the college try. The docs are slowly getting better but other than that I have heard great things from all over the Internet about it once you get your head around it. I failed at figuring it out on my own but the day will come where it makes sense I’m sure.
I think one of the issues with nixos learning materials is that they eschew talking about how to write your own packages. but to really understand anything, you have to get your head around writing and modifying packages. in nix, a package is just a build step that can do I/O during particular phases and produces an output to the nix store, so they’re an essential building block for anything that isn’t utterly trivial.
the other major stumbling block is working out how modules (the things that let you write config for the system) can actually be composed. adding a new module to imports gives you new config params you can set so you can organize your system config in terms of modules and packages to make things work the way you like.
Nix Pills are the canonical learning material for packages. I don’t know of any good learning material for modules - I learned by working on nixpkgs and another involved project that made extensive use of modules.
lastly, nix config files are written in the nix language and it’s a bit idiosyncratic. it almost looks and feels like Haskell but it’s slightly different in important ways. there’s no way around learning it if you have multiple systems and want to share config between them.
I still need to give NixOS the college try. The docs are slowly getting better but other than that I have heard great things from all over the Internet about it once you get your head around it. I failed at figuring it out on my own but the day will come where it makes sense I’m sure.
I think one of the issues with nixos learning materials is that they eschew talking about how to write your own packages. but to really understand anything, you have to get your head around writing and modifying packages. in nix, a package is just a build step that can do I/O during particular phases and produces an output to the nix store, so they’re an essential building block for anything that isn’t utterly trivial.
the other major stumbling block is working out how modules (the things that let you write config for the system) can actually be composed. adding a new module to imports gives you new config params you can set so you can organize your system config in terms of modules and packages to make things work the way you like.
Nix Pills are the canonical learning material for packages. I don’t know of any good learning material for modules - I learned by working on nixpkgs and another involved project that made extensive use of modules.
lastly, nix config files are written in the nix language and it’s a bit idiosyncratic. it almost looks and feels like Haskell but it’s slightly different in important ways. there’s no way around learning it if you have multiple systems and want to share config between them.
For learning how to write and modify packages there is the nixpkgs manual, which also contains a section on writing modules.
Between zero-to-nix.com and nixos.wiki, I think there are enough docs to get started with it quickly.