Flakes: Difference between revisions
imported>Hypnosis2839 →Basic project usage: simplify warning, clarify git-related warning, remove imperative command |
imported>Hypnosis2839 m →Basic project usage: clarify git warning |
||
Line 58: | Line 58: | ||
{{warning | Files that are part of the flake will be copied to the world-readable nix store when the flake is evaluated; avoid putting unencrypted secrets in your flake.}} | {{warning | Files that are part of the flake will be copied to the world-readable nix store when the flake is evaluated; avoid putting unencrypted secrets in your flake.}} | ||
In your | In your project, run <code>nix flake init</code> to generate the flake.nix file. | ||
For flakes in git repos, only files in the working tree will be copied to the store. | |||
Therefore, if you use <code>git</code> for your flake, ensure to <code>git add</code> any project files after you first create them. | |||
See also https://www.tweag.io/blog/2020-05-25-flakes/ | See also https://www.tweag.io/blog/2020-05-25-flakes/ |