nix templates: factor harness-base.nix (shared scaffolding incl. gitconfig)

This commit is contained in:
müde 2026-05-15 16:10:55 +02:00
parent cb62e15d4f
commit e1289a3e4c
11 changed files with 137 additions and 113 deletions

View file

@ -1,27 +1,14 @@
{ pkgs, ... }:
{
boot.isNspawnContainer = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "claude-code" ];
environment.systemPackages = with pkgs; [
hyperhive
claude-code
bashInteractive
git
coreutils-full
];
# claude's Bash tool refuses to run without a POSIX shell + $SHELL set.
environment.variables.SHELL = "${pkgs.bashInteractive}/bin/bash";
imports = [ ./harness-base.nix ];
systemd.services.hive-ag3nt = {
description = "hive-ag3nt harness";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
# The harness shells out to `claude` (turn loop + login flow). systemd
# units get a minimal PATH by default, so we have to put claude-code on
# it explicitly even though it's in environment.systemPackages above.
# bash is on PATH so claude's Bash tool can spawn `$SHELL`.
# `claude` for the turn loop + `bash` for claude's Bash tool. systemd
# units get a minimal PATH by default; entries in
# `environment.systemPackages` aren't on it.
path = [
pkgs.claude-code
pkgs.bashInteractive
@ -33,6 +20,4 @@
RestartSec = 2;
};
};
system.stateVersion = "25.11";
}