• Random Dent@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 months ago

    I’ve read so many things that try to explain what flakes are, and for the life of me I still don’t understand what they are or what they’re for lol.

    • Laser@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      They’re not that different from the classic nix files. Their main difference is that their inputs are always well-defined (as opposed to a channels registry, i.e. you can get totally different systems by reapplying a configuration when you change channels which doesn’t change your nix file at all). A configuration is always exactly described by a flake.nix and flake.lock.

      I mean there is more to it, but this is the primary motivation. What you would normally put into use case specific nix files goes into a flake’s output section. The stuff in your input sections is what you can use in there.