From 33acb841f0147b8e24e62ffc2b409228c903b065 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 21 Mar 2024 10:15:42 +0200 Subject: [PATCH] services/binary-cache: cherry-pick nar-serve patch Signed-off-by: Florian Klink --- services/binary-cache/default.nix | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/services/binary-cache/default.nix b/services/binary-cache/default.nix index 0a1f0993..92b7804c 100644 --- a/services/binary-cache/default.nix +++ b/services/binary-cache/default.nix @@ -1,10 +1,30 @@ # SPDX-FileCopyrightText: 2022-2024 TII (SSRC) and the Ghaf contributors # SPDX-License-Identifier: Apache-2.0 -{config, ...}: { +{ + config, + pkgs, + ... +}: { services = { harmonia = { enable = true; signKeyPath = config.sops.secrets.cache-sig-key.path; + package = pkgs.harmonia.overrideAttrs (old: { + patches = + old.patches + or [] + ++ [ + # Cherry-pick of https://github.com/nix-community/harmonia/pull/293 into 0.7.3 + # We can't bump to 0.7.5 in release-23.11 as it brings a libnixstore bump + # with backwards-incompatible changes (for a new Nix version). + # Sent upstream in https://github.com/NixOS/nixpkgs/pull/297989, + # can be dropped here once nixpkgs channel moves past that. + (pkgs.fetchpatch { + url = "https://github.com/nix-community/harmonia/pull/293/commits/3232511db91b7dce97172a8b018f0056585890f5.patch"; + hash = "sha256-BQ2eJkPTKnwa62dqy6qe7Jq+wJ2Ds5VhT5ST/xVlHiQ="; + }) + ]; + }); }; }; networking.firewall.allowedTCPPorts = [5000];