Nixos design patterns for newbies

Hi all, I’m new to nix and nixos and I try to make my first steps

after getting my head around the not-so-easy-to-learn primitives, packages, language, structures, ecosystem, learning tools etc. - what I need is, as a flake/derivation could be anything, some guidance and standards for common design-patterns / best practices for flakes outputs:

if I understand correctly there are a few common flakes common outputs such as:

  1. helper functions: an internal function to be used in another flake itself
  2. apps/packages: stands for an executable or application
  3. dev shells: set of apps, environment variables and files to be executed in a shell environment
  4. profiles: a user-level full setup such as permissions, groups, password, files, window manager, all preferences, and enabled daemons
  5. nixos configurations: usually a system-level setup such as hardware, networking setup, users, nix extra-features etc.
  6. configuration modules: attribute sets that define the settings specific configurations and defaults to be used in all the above

what I’m missing most is a guide / standard on how to construct each one of these, what would each of these look like, what are its internals, how to build them.
if a there was a tool (other than a file editor) that could help me create, reason and experiment about these outcomes that could be a real welcoming assistance

is there anything like this that one could point me to please? preferably something simple

thanks

2 Likes

I am not sure this is exactly what you are looking for, but Misterio77 has some lovely sample configurations. They provide a basic structure for a nixos configuration, which you can then fill with your own configuration or whatever.

1 Like