Open domenkozar opened 6 years ago
There's extra-substituters
, same for certain other options.
I'm not sure if append is desirable behaviour in general. What if you want to override? Also, should it prepend or append?
Maybe appending could be a special syntax, e.g.
substituters += https://...
or --substituters +https://...
.
For the command line syntax, the GNU command line guidelines for long options generally supports --foo=bar
to be equivalent to --foo bar
. So if we supported that, then --substituters+=https://foo.bar
would be a quite logical extension.
Additionally, it'd be nice if there were ways to specify many config files other than the two default ones.
Configuration files can use import
to load additional config files. Does that suit your needs, @ElvishJerricco?
@grahamc Had no idea.That's awesome. Is that documented? And I assume it still causes overwriting of options?
Oops, I meant include
-- yes it is documented: https://nixos.org/nix/manual/#description-41
Using +=
seems fine to me as long as there's an equivalent for --options substituters ...
, something like --options-append substituters ...
I just ran into a very confusing issue where I had a shell alias in a shellHook
with multiple --option trusted-public-keys
options.
Suddenly my machine was recompiling the linux kernel after a nixpkgs upgrade. I couldn't figure out what was wrong until @domenkozar pointed out that --option trusted-public-keys
overrides instead of appending. So :+1: on this issue!
This seems to be addressed with https://github.com/NixOS/nix/commit/ff4dea63c9403880500f82ce273713ecf793d2d9 (on master), but I still need to confirm that.
I marked this as stale due to inactivity. → More info
Not stale.
I marked this as stale due to inactivity. → More info
Not stale bot marked as not stale due to activity of the stale bot.
I'd expect
substituters
in~/.config/nix/nix.conf
to be appended on top of the system/etc/nix/nix.conf
, but currently, Nix overrides them.