Watch
0
0
Fork
You've already forked hyperhive
0

move c0re.hyperhiveFlake to deploy.hyperhiveFlake

This commit is contained in:
atlas 2026-10-29 14:31:20 +01:00
commit 70538fb209
4 changed files with 39 additions and 24 deletions

View file

@ -198,6 +198,11 @@ in
# The c0re daemon is the hive-controller service, so its knobs and package
# options sit under it. Same types, same meanings.
# One host-level value, read by hive-c0re and the swarm builder alike.
(lib.mkRenamedOptionModule
[ "services" "hyperhive" "c0re" "hyperhiveFlake" ]
[ "services" "hyperhive" "deploy" "hyperhiveFlake" ]
)
(lib.mkRenamedOptionModule
[ "services" "hyperhive" "c0re" "package" ]
[ "services" "hyperhive" "deploy" "hive-controller" "package" ]

View file

@ -11,8 +11,8 @@
...
}:
let
cfg = config.services.hyperhive.c0re;
controllerCfg = config.services.hyperhive.deploy.hive-controller;
hyperhiveFlake = config.services.hyperhive.deploy.hyperhiveFlake;
# `/run/hyperhive`'s mode. Held in one place because whichever of the two
# units below activates first creates the directory, so they cannot be
@ -81,7 +81,7 @@ let
# NOT trigger a startup sweep that rebuilds every agent — unless the
# c0re binary itself changes.
serveConfigJson = builtins.toJSON {
hyperhive_flake = cfg.hyperhiveFlake;
hyperhive_flake = hyperhiveFlake;
# The `claude-code` every agent runs, or null for "each agent keeps
# the one out of its own nixpkgs". `builtins.toJSON` serialises a

View file

@ -1,10 +1,9 @@
# Option declarations for the c0re daemon. `services.hyperhive.c0re.*`
# keeps the flake-source option the swarm builder also reads
# (`hyperhiveFlake`); every other knob and the
# Option declarations for the c0re daemon. The knobs and the
# package/asset options the flake's `nixosModules.default` wires to its
# own outputs (they carry no in-module defaults; see ../../../flake.nix)
# live under `services.hyperhive.deploy.hive-controller`, alongside the
# values the meta-flake render hands the hive's agents. The read-only
# values the meta-flake render hands the hive's agents. The flake-source
# option the swarm builder also reads is `services.hyperhive.deploy.hyperhiveFlake`. The read-only
# `servedFrontend` option lives in ./theme.nix with the stylix wiring
# that computes it.
{
@ -22,17 +21,18 @@
'')
];
options.services.hyperhive.c0re = {
hyperhiveFlake = lib.mkOption {
type = lib.types.str;
defaultText = lib.literalMD "the hyperhive flake's own filtered source store path";
description = ''
Store path of the hyperhive flake source (no fragment). hive-c0re
reads it to tell which revision is running, and the swarm builder
builds on it. Wired by `nixosModules.default` to this flake's own
filtered source.
'';
};
# One host-level value that both hive-c0re and the swarm builder read, so it
# sits under neither service.
options.services.hyperhive.deploy.hyperhiveFlake = lib.mkOption {
type = lib.types.str;
internal = true;
defaultText = lib.literalMD "the hyperhive flake's own filtered source store path";
description = ''
Store path of the hyperhive flake source (no fragment). hive-c0re
reads it to tell which revision is running, and the swarm builder
builds on it. Wired by `nixosModules.default` to this flake's own
filtered source.
'';
};
# The hive-controller's deployment options.

View file

@ -89,7 +89,7 @@ let
nix = config.nix.package;
# Strings, not paths: both are already store paths.
hyperhiveFlake = hyperhiveCfg.c0re.hyperhiveFlake;
hyperhiveFlake = hyperhiveCfg.deploy.hyperhiveFlake;
nixpkgsFlake = hyperhiveCfg.deploy.builder.nixpkgsFlake;
# The assertion below keeps the two options together.