Flakes: Difference between revisions

imported>Bobvanderlinden
No edit summary
imported>Jorsn
Remove warning „only works in git/hg repo“ -- This is not true.
Line 63: Line 63:


== Basic project usage ==
== Basic project usage ==
{{warning|flake makes a strong assumption that the folder is a git or mercurial repository. It doesn’t work outside of them.}}


In your repo, run <code>nix flake init</code> to generate the flake.nix file. Then run <code>git add flake.nix</code> to add it to the git staging area, otherwise nix will not recognize that the file exists.
In your repo, run <code>nix flake init</code> to generate the flake.nix file. Then run <code>git add flake.nix</code> to add it to the git staging area, otherwise nix will not recognize that the file exists.