Flakes: Difference between revisions
imported>Hypnosis2839 →Enable unfree software: point to dedicated wiki page |
imported>Hypnosis2839 →Basic project usage: simplify warning, clarify git-related warning, remove imperative command |
||
Line 56: | Line 56: | ||
== Basic project usage == | == Basic project usage == | ||
{{warning | | {{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 repo, run <code>nix flake init</code> to generate the flake.nix file. | In your repo, run <code>nix flake init</code> to generate the flake.nix file. | ||
If you use <code>git</code>, ensure to <code>git add</code> any project files, because for flakes in git repos, only files in the working tree will be copied to the store. | |||
See also https://www.tweag.io/blog/2020-05-25-flakes/ | See also https://www.tweag.io/blog/2020-05-25-flakes/ | ||
== Flake schema == | == Flake schema == |