hyperhive/nix/templates/manager.nix
müde 0f0e242906 programs.git.enable + harness PATH tracks systemPackages
- harness-base.nix: switch to programs.git for declarative gitconfig.
- agent + manager service path = /run/current-system/sw → agents pick up
  new packages from their own agent.nix without harness edits.
- generated applied/<name>/flake.nix overrides programs.git.config.user
  (no more raw etc.gitconfig collision).
2026-05-15 16:16:14 +02:00

29 lines
1 KiB
Nix

{ pkgs, ... }:
{
imports = [ ./harness-base.nix ];
# HIVE_PORT/HIVE_LABEL/gitconfig are also injected by the generated
# `applied/hm1nd/flake.nix` (see `lifecycle::setup_applied`); the values
# here are the base config so the container stays sensible if anyone
# ever evaluates `nixosConfigurations.manager` standalone.
systemd.services.hive-m1nd = {
description = "hive-m1nd manager harness";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
environment = {
HIVE_PORT = "8000";
HIVE_LABEL = "hm1nd";
SHELL = "${pkgs.bashInteractive}/bin/bash";
};
# See note in agent-base.nix — `/run/current-system/sw` makes the
# harness service PATH track `environment.systemPackages` so anything
# an agent adds to its own `agent.nix` is visible without editing the
# service definition.
path = [ "/run/current-system/sw" ];
serviceConfig = {
ExecStart = "${pkgs.hyperhive}/bin/hive-m1nd serve";
Restart = "on-failure";
RestartSec = 2;
};
};
}