Add use-registries config option (and deprecate --no-registries flag)

Some people want to avoid using registries at all on their system; Instead
of having to add --no-registries to every command, this commit allows to
set use-registries = false in the config. --no-registries is still allowed
everywhere it was allowed previously, but is now deprecated.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
Alexander Bantyev
2021-07-16 23:26:04 +03:00
co-authored by Eelco Dolstra
parent db4d4cf4ba
commit 3e57e3480b
5 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ struct LockFlags
/* Whether to use the registries to lookup indirect flake
references like 'nixpkgs'. */
bool useRegistries = true;
std::optional<bool> useRegistries = std::nullopt;
/* Whether to apply flake's nixConfig attribute to the configuration */