remove the hive's local build of agent closures
A rebuild or create downloads the closure the swarm built and applies it; with none to deploy it fails and changes nothing. hive-priv takes a store path instead of an internal/meta commit and builds nothing.
This commit is contained in:
parent
70538fb209
commit
4590b04cac
1 changed files with 632 additions and 1351 deletions
|
|
@ -234,13 +234,12 @@ let
|
|||
&& env shared.controllerAlone == { };
|
||||
}
|
||||
{
|
||||
# nix fetches the forge inputs with `git`, so the credential helper and
|
||||
# the https-to-http rewrite are git config in both processes that build:
|
||||
# hive-c0re (prebuilds) and hive-priv (builds as root, from its own
|
||||
# HOME). The controller's unit is the control that the lookup tells a
|
||||
# unit with the helper from one without; the URL hive-priv builds
|
||||
# `internal/meta` from is the one hive-c0re reads the forge at.
|
||||
name = "hive-c0re and hive-priv answer the forge's git fetches and rewrite its https inputs to http";
|
||||
# hive-c0re carries the credential helper and the https-to-http rewrite as
|
||||
# git config. hive-priv builds nothing and fetches nothing from the forge,
|
||||
# so it carries neither and has no forge URL. The hive-c0re arm is the
|
||||
# control that the lookups find a helper and a forge URL where there is
|
||||
# one, so the absences on hive-priv and the controller are real.
|
||||
name = "hive-c0re answers the forge's git fetches and rewrites its https inputs to http; hive-priv has neither";
|
||||
ok =
|
||||
let
|
||||
forge = allLocal.services.hyperhive.swarm.forge.domain;
|
||||
|
|
@ -256,7 +255,7 @@ let
|
|||
env = unit: allLocal.systemd.services.${unit}.environment;
|
||||
in
|
||||
helperOn "hive-c0re"
|
||||
&& helperOn "hive-priv"
|
||||
&& !(helperOn "hive-priv")
|
||||
# The helper answers from the file hive-c0re publishes the hive's own
|
||||
# token to. The first arm is the control for the second: the lookup
|
||||
# finds the helper's text, so the absent `core` strings are really absent.
|
||||
|
|
@ -267,8 +266,8 @@ let
|
|||
&& !(helperOn "swarm-controller")
|
||||
&& lib.hasInfix "[credential \"http://${forge}\"]\nhelper =\nhelper = hive-forge" git.config
|
||||
&& lib.hasInfix "[url \"http://${forge}/\"]\ninsteadOf = https://${forge}/" git.config
|
||||
&& (env "hive-priv").HIVE_PRIV_FORGE_URL == "http://${forge}"
|
||||
&& (env "hive-priv").HIVE_PRIV_FORGE_URL == (env "hive-c0re").HIVE_FORGE_URL;
|
||||
&& (env "hive-c0re") ? HIVE_FORGE_URL
|
||||
&& !((env "hive-priv") ? HIVE_PRIV_FORGE_URL);
|
||||
}
|
||||
{
|
||||
# `hyperhive_rev` defaults to none on the controller, so a settings JSON
|
||||
|
|
|
|||
Loading…
Reference in a new issue