fix(substituters): Allow all paths from the infra cache
All checks were successful
Check meta / check_dns (pull_request) Successful in 15s
Check meta / check_meta (pull_request) Successful in 16s
Check workflows / check_workflows (pull_request) Successful in 18s
Run pre-commit on all files / pre-commit (pull_request) Successful in 30s
Build all the nodes / ap01 (pull_request) Successful in 38s
Build all the nodes / bridge01 (pull_request) Successful in 59s
Build all the nodes / cof02 (pull_request) Successful in 1m6s
Build all the nodes / build01 (pull_request) Successful in 1m7s
Build all the nodes / geo01 (pull_request) Successful in 59s
Build all the nodes / geo02 (pull_request) Successful in 59s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m8s
Build all the nodes / compute01 (pull_request) Successful in 1m32s
Build all the nodes / hypervisor02 (pull_request) Successful in 57s
Build all the nodes / hypervisor03 (pull_request) Successful in 56s
Build all the nodes / netcore00 (pull_request) Successful in 22s
Build all the nodes / netaccess01 (pull_request) Successful in 22s
Build all the nodes / iso (pull_request) Successful in 1m6s
Build all the nodes / lab-router01 (pull_request) Successful in 1m1s
Build all the nodes / netcore01 (pull_request) Successful in 23s
Build all the nodes / netcore02 (pull_request) Successful in 22s
Build all the nodes / krz01 (pull_request) Successful in 1m44s
Build all the nodes / tower01 (pull_request) Successful in 59s
Build all the nodes / rescue01 (pull_request) Successful in 1m12s
Build all the nodes / vault01 (pull_request) Successful in 1m17s
Build all the nodes / web01 (pull_request) Successful in 1m25s
Build all the nodes / storage01 (pull_request) Successful in 1m35s
Build the shell / build-shell (pull_request) Successful in 29s
Build all the nodes / web02 (pull_request) Successful in 58s
Build all the nodes / web03 (pull_request) Successful in 1m3s
Run pre-commit on all files / pre-commit (push) Successful in 33s
Build all the nodes / ap01 (push) Successful in 41s
Build all the nodes / bridge01 (push) Successful in 1m0s
Build all the nodes / geo01 (push) Successful in 1m4s
Build all the nodes / hypervisor01 (push) Successful in 1m14s
Build all the nodes / geo02 (push) Successful in 1m16s
Build all the nodes / cof02 (push) Successful in 1m18s
Build all the nodes / hypervisor03 (push) Successful in 1m18s
Build all the nodes / hypervisor02 (push) Successful in 1m19s
Build all the nodes / build01 (push) Successful in 1m21s
Build all the nodes / iso (push) Successful in 1m21s
Build all the nodes / netaccess01 (push) Successful in 23s
Build all the nodes / netcore00 (push) Successful in 22s
Build all the nodes / compute01 (push) Successful in 1m37s
Build all the nodes / netcore01 (push) Successful in 24s
Build all the nodes / lab-router01 (push) Successful in 59s
Build all the nodes / netcore02 (push) Successful in 24s
Build all the nodes / krz01 (push) Successful in 1m49s
Build the shell / build-shell (push) Successful in 24s
Build all the nodes / tower01 (push) Successful in 1m1s
Build all the nodes / web02 (push) Successful in 1m5s
Build all the nodes / vault01 (push) Successful in 1m15s
Build all the nodes / web03 (push) Successful in 1m10s
Build all the nodes / rescue01 (push) Successful in 1m21s
Build all the nodes / storage01 (push) Successful in 1m29s
Build all the nodes / web01 (push) Successful in 1m26s

This commit is contained in:
Tom Hubrecht 2025-05-03 19:31:39 +02:00 committed by thubrecht
parent 9aabdedb83
commit 5dceb573b7
3 changed files with 29 additions and 12 deletions

View file

@ -1,18 +1,39 @@
# SPDX-FileCopyrightText: 2024 Maurice Debray <maurice.debray@dgnum.eu>
# SPDX-FileCopyrightText: 2025 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ lib, ... }:
let
inherit (lib)
attrValues
catAttrs
concatLists
getAttrs
isAttrs
;
cache-info = {
infra = {
public-key = "infra.snix-store.dgnum.eu-1:8CAY64o3rKjyw2uA5mzr/aTzstnc+Uj4g8OC6ClG1m8=";
keys = [
"infra.snix-store.dgnum.eu-1:8CAY64o3rKjyw2uA5mzr/aTzstnc+Uj4g8OC6ClG1m8="
"infra.tvix-store.dgnum.eu-1:8CAY64o3rKjyw2uA5mzr/aTzstnc+Uj4g8OC6ClG1m8="
];
url = "https://snix-store.dgnum.eu/infra";
};
};
in
{ caches }:
caches':
let
caches = if isAttrs caches' then caches'.caches else caches';
selected = attrValues (getAttrs caches cache-info);
in
{
substituters = builtins.map (cache: cache-info.${cache}.url) caches;
trusted-public-keys = builtins.map (cache: cache-info.${cache}.public-key) caches;
substituters = catAttrs "url" selected;
trusted-public-keys = concatLists (catAttrs "keys" selected);
}