aboutsummaryrefslogtreecommitdiff
path: root/src/nix/installables.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-10-26 20:45:39 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-10-26 20:45:39 +0100
commit343239fc8a1993f707a990c2cd54a41f1fa3de99 (patch)
tree2c301b436ef4bc58b1ce3fec3225a2285dc7dbca /src/nix/installables.cc
parent731edf0d9be27d1a64c9645595c7efba31dde2b1 (diff)
Allow nix.conf options to be set in flake.nix
This makes it possible to have per-project configuration in flake.nix, e.g. binary caches and other stuff: nixConfig.bash-prompt-suffix = "ngi# "; nixConfig.substituters = [ "https://cache.ngi0.nixos.org/" ];
Diffstat (limited to 'src/nix/installables.cc')
-rw-r--r--src/nix/installables.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 7473c9758..fb264491a 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -533,8 +533,11 @@ InstallableFlake::getCursors(EvalState & state)
std::shared_ptr<flake::LockedFlake> InstallableFlake::getLockedFlake() const
{
- if (!_lockedFlake)
+ if (!_lockedFlake) {
_lockedFlake = std::make_shared<flake::LockedFlake>(lockFlake(*state, flakeRef, lockFlags));
+ _lockedFlake->flake.config.apply();
+ // FIXME: send new config to the daemon.
+ }
return _lockedFlake;
}