Flakes: Difference between revisions

imported>Bqv
derivation
imported>Bqv
No edit summary
Line 46: Line 46:


== Basic project usage ==
== Basic project usage ==
{{warning|flake makes a strong assumption that the folder is a git repository. It doesn’t work outside of them.}}
{{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.