From 232202627f4969e9e1e68455bad9ac176d6518b4 Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Wed, 5 Nov 2025 08:39:16 +0000 Subject: [PATCH] fix(midnight): stop using cache.freshlybakedca.ke Change-Id: pmmpmsqruuupvlzznurmulnwlrvkzzsz Midnight hosts cache.freshlybakedca.ke, so there are problems (errors) if it tries to use it too. Since as there's no process to filter out of a list of values without losing the rest of the list (*except evaluating twice through scalpel like processes), we need to disable this at the source. That means it's best to pull this out into an ingredient and detect whether the ingredient is enabled for turning the cache on/off... --- packetmix/systems/common/packetmix.nix | 6 ++++-- packetmix/systems/default.nix | 1 + packetmix/systems/{midnight => nix-serve}/cache.nix | 0 3 files changed, 5 insertions(+), 2 deletions(-) rename packetmix/systems/{midnight => nix-serve}/cache.nix (100%) diff --git a/packetmix/systems/common/packetmix.nix b/packetmix/systems/common/packetmix.nix index d53f4ae8..439b94e1 100644 --- a/packetmix/systems/common/packetmix.nix +++ b/packetmix/systems/common/packetmix.nix @@ -5,12 +5,14 @@ # packetmix.nix: packetmix support configuration, including our binary cache and auto-updating { config, pkgs, ... }: { - nix.settings.substituters = [ + nix.settings.substituters = (if !config.ingredient.nix-serve.enable then [ "https://cache.freshlybakedca.ke" + ]) ++ [ "https://freshlybakedcake.cachix.org" ]; - nix.settings.trusted-public-keys = [ + nix.settings.trusted-public-keys = (if !config.ingredient.nix-serve.enable then [ "cache.freshlybakedca.ke-1:WD7CED6MwAxxOzgHlrHVbcVdYeqSa2mwBwR3vNuCJvg=" + ]) ++ [ "freshlybakedcake.cachix.org-1:YmhsHdeKjqbaS33PPJXJllTHBupT3hliQrPcllJXkE0=" ]; diff --git a/packetmix/systems/default.nix b/packetmix/systems/default.nix index 6cddd36f..507fa10c 100644 --- a/packetmix/systems/default.nix +++ b/packetmix/systems/default.nix @@ -89,6 +89,7 @@ in pkgs = nixpkgs.x86_64-linux; ingredients = [ "freshlybakedcake" + "nix-serve" "server" ]; args = { diff --git a/packetmix/systems/midnight/cache.nix b/packetmix/systems/nix-serve/cache.nix similarity index 100% rename from packetmix/systems/midnight/cache.nix rename to packetmix/systems/nix-serve/cache.nix -- 2.43.0