Flakes: Difference between revisions
imported>Jorsn Remove warning „only works in git/hg repo“ -- This is not true. |
imported>Jorsn Add privacy warning (flakes get copied to the store) |
||
Line 63: | Line 63: | ||
== Basic project usage == | == Basic project usage == | ||
{{warning | The whole directory of a flake is copied to the nix store when the flake is evaluated. So don't let secrets lie around in a flake. If you use git or mercurial, ignored files are not copied.}} | |||
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. |