flake: expose hyperhive package + nixos module + agent-base container

This commit is contained in:
müde 2026-05-14 20:33:25 +02:00
parent 6686df93a5
commit c67584c7c1
6 changed files with 145 additions and 0 deletions

32
nix/modules/hive-c0re.nix Normal file
View file

@ -0,0 +1,32 @@
{
pkgs,
lib,
config,
...
}:
let
cfg = config.services.hive-c0re;
in
{
options.services.hive-c0re = {
enable = lib.mkEnableOption "hive-c0re hyperhive coordinator daemon";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.hyperhive;
defaultText = lib.literalExpression "pkgs.hyperhive";
description = "Package that provides /bin/hive-c0re.";
};
};
config = lib.mkIf cfg.enable {
systemd.services.hive-c0re = {
description = "hyperhive coordinator daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/hive-c0re";
Restart = "on-failure";
RestartSec = 2;
};
};
};
}

View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
boot.isContainer = true;
environment.systemPackages = [ pkgs.hyperhive ];
systemd.services.hive-ag3nt = {
description = "hive-ag3nt harness";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.hyperhive}/bin/hive-ag3nt";
Type = "oneshot";
};
};
system.stateVersion = "25.11";
}