Phase 5b: per-agent config flakes; approve validates + advances commit
This commit is contained in:
parent
22b65d35f3
commit
433c0d212e
6 changed files with 182 additions and 25 deletions
|
|
@ -16,10 +16,15 @@ in
|
|||
defaultText = lib.literalExpression "pkgs.hyperhive";
|
||||
description = "Package that provides /bin/hive-c0re.";
|
||||
};
|
||||
agentFlake = lib.mkOption {
|
||||
hyperhiveFlake = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/etc/hyperhive#agent-base";
|
||||
description = "Flake reference passed to `nixos-container create --flake` when spawning sub-agents.";
|
||||
default = "/etc/hyperhive";
|
||||
description = ''
|
||||
URL of the hyperhive flake (no fragment). Inlined into each
|
||||
per-agent `flake.nix` at `inputs.hyperhive.url`. The per-agent
|
||||
flake then pulls `hyperhive.nixosConfigurations.agent-base` to
|
||||
build the container.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -31,7 +36,7 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ "/run/current-system/sw" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/hive-c0re --socket /run/hyperhive/host.sock serve --agent-flake ${cfg.agentFlake}";
|
||||
ExecStart = "${cfg.package}/bin/hive-c0re --socket /run/hyperhive/host.sock serve --hyperhive-flake ${cfg.hyperhiveFlake}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 2;
|
||||
RuntimeDirectory = "hyperhive";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue