From fac38a9ea24cbee164d8fca37aeb015a3f5b9e14 Mon Sep 17 00:00:00 2001 From: EdenEast Date: Thu, 4 Jan 2024 13:00:45 -0500 Subject: [PATCH] feat(nix): add cachix binary cache to flake Nix flake [schema] allows for a top level attribute called `nixConfig`. This allows a flake to extend a users nix for the specific flake. This lets us add ghostty's binary cache automatically when using the repo (nix develop, nix build, ...). [schema]: https://nixos.wiki/wiki/Flakes#Flake_schema --- flake.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flake.nix b/flake.nix index 0dd0b9655..b3bcd07c9 100644 --- a/flake.nix +++ b/flake.nix @@ -62,4 +62,9 @@ # Our supported systems are the same supported systems as the Zig binaries. }) (builtins.attrNames zig.packages)); + + nixConfig = { + extra-substituters = ["https://ghostty.cachix.org"]; + extra-trusted-public-keys = ["ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="]; + }; }