about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorBrendan Taylor <bct@diffeq.com>2023-09-22 14:08:33 -0600
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-09-27 23:35:47 +0200
commit95e66809debf42dbe1e4935fd31c8c275914d2eb (patch)
treea9c37125d00035cf4f32a7f816057d4e1ac58060 /nixos
parent5266b96d2ea595b56d9fb18f272ced93ceaac313 (diff)
downloadnixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.tar
nixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.tar.gz
nixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.tar.bz2
nixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.tar.lz
nixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.tar.xz
nixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.tar.zst
nixlib-95e66809debf42dbe1e4935fd31c8c275914d2eb.zip
coredns: allow adding external plugins
Solves https://github.com/NixOS/nixpkgs/issues/146603

CoreDNS has support for plugins that are added at compile time. This
exposes an argument `externalPlugins` that will build coredns with
the specified plugins.

Example:
```
coredns-fanout = pkgs.coredns.override {
  externalPlugins = [
    {name = "fanout"; repo = "github.com/networkservicemesh/fanout"; version = "v1.9.1";}
  ];
  vendorHash = "<SRI hash>";
};
```
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index 123242926e2a..3363f8faee2a 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -344,6 +344,24 @@ The module update takes care of the new config syntax and the data itself (user
   - `keepTerminfo` controls whether `TERMINFO` and `TERMINFO_DIRS` are preserved
     for `root` and the `wheel` group.
 
+- CoreDNS can now be built with external plugins by overriding `externalPlugins` and `vendorHash` arguments like this:
+
+  ```
+  services.coredns = {
+    enable = true;
+    package = pkgs.coredns.override {
+      externalPlugins = [
+        {name = "fanout"; repo = "github.com/networkservicemesh/fanout"; version = "v1.9.1";}
+      ];
+      vendorHash = "<SRI hash>";
+    };
+  };
+  ```
+
+  To get the necessary SRI hash, set `vendorHash = "";`. The build will fail and produce the correct `vendorHash` in the error message.
+
+  If you use this feature, updates to CoreDNS may require updating `vendorHash` by following these steps again.
+
 
 ## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}