Basics of The Nix language
The Nix language is used to declare the configuration to be built by Nix, if you want to play with NixOS and Flakes and enjoy the benefits they bring, you must learn the basics of this language first.
The Nix language is a simple functional language, if you already have some experience in programming, it should take less than 2 hours to go through its basics.
Please read Nix language basics - nix.dev and Chapter 4. The Basics of the Language - Nix Pills to get a basic understanding of the Nix language now, they are all good introductory materials.