about summary refs log tree commit diff
path: root/third_party/nixpkgs
diff options
context:
space:
mode:
authorzseri <zseri.devel@ytrizja.de>2021-12-27T22·46+0100
committerclbot <clbot@tvl.fyi>2021-12-28T09·34+0000
commitf79153998783532c9bbce9347ae7d2ac0de31d9e (patch)
tree81ac3b3a50eee782fa888de38acc5d2b09f985af /third_party/nixpkgs
parent413c421e8bf41e0462a9015ad398b6efebaf1f1b (diff)
feat(3p/nixpkgs): allow injecting user nixpkgs config r/3487
use case: system-wide 'testing' usage of content-addressed derivations

Change-Id: I1f63ddf679da7d53ff0d8a851642dd081a70fe55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4551
Tested-by: BuildkiteCI
Reviewed-by: zseri <zseri.devel@ytrizja.de>
Reviewed-by: tazjin <mail@tazj.in>
Autosubmit: zseri <zseri.devel@ytrizja.de>
Diffstat (limited to 'third_party/nixpkgs')
-rw-r--r--third_party/nixpkgs/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/third_party/nixpkgs/default.nix b/third_party/nixpkgs/default.nix
index 872a7e79e8..f8831f1fd5 100644
--- a/third_party/nixpkgs/default.nix
+++ b/third_party/nixpkgs/default.nix
@@ -57,9 +57,15 @@ let
       stable = stableHashes.commit;
     };
   };
+
 in import nixpkgsSrc {
-  config.allowUnfree = true;
-  config.allowBroken = true;
+  # allow users to inject their config into builds (e.g. to test CA derivations)
+  config =
+    (if externalArgs ? nixpkgsConfig then externalArgs.nixpkgsConfig else { })
+    // {
+      allowUnfree = true;
+      allowBroken = true;
+    };
   overlays = [
     commitsOverlay
     stableOverlay