Flakes: Difference between revisions
imported>DieracDelta m Added reference to flake.md |
imported>Ilkecan m Clarify that only the files tracked by a version control are moved to the nix store |
||
| Line 79: | Line 79: | ||
== Basic project usage == | == Basic project usage == | ||
{{warning | | {{warning | All files tracked by the version control system (e.g. git or mercurial) will be copied to the nix store when the flake is evaluated. So be careful when putting secrets in version control (which is not optimal by itself) around a flake.}} | ||
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. | ||