mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
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:
parent
db4d4cf4ba
commit
3e57e3480b
5 changed files with 20 additions and 7 deletions
|
@ -60,7 +60,10 @@ MixFlakeOptions::MixFlakeOptions()
|
|||
.longName = "no-registries",
|
||||
.description = "Don't allow lookups in the flake registries.",
|
||||
.category = category,
|
||||
.handler = {&lockFlags.useRegistries, false}
|
||||
.handler = {[&]() {
|
||||
lockFlags.useRegistries = false;
|
||||
warn("--no-registries is deprecated; use --no-use-registries (a.k.a --option use-registries false)");
|
||||
}}
|
||||
});
|
||||
|
||||
addFlag({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue