harness-base: wrap config attributes after introducing options

mixing options.* with bare config-level attributes (boot.*, environment.*, etc.) at the same level isn't supported once the module declares any options — nix needs them under an explicit 'config = { ... }' block. error from the host: 'unsupported attribute boot. caused by introducing top-level options'. wrap accordingly.
This commit is contained in:
müde 2026-05-16 02:17:15 +02:00
parent 7d6d8e96c1
commit 66a69d0c7f

View file

@ -59,45 +59,47 @@
''; '';
}; };
environment.etc."hyperhive/extra-mcp.json".text = config = {
builtins.toJSON config.hyperhive.extraMcpServers; environment.etc."hyperhive/extra-mcp.json".text =
builtins.toJSON config.hyperhive.extraMcpServers;
boot.isNspawnContainer = true; boot.isNspawnContainer = true;
# `claude-code` is unfree. Each per-agent container's nixosConfiguration # `claude-code` is unfree. Each per-agent container's nixosConfiguration
# evaluates its own `nixpkgs` instance, so the operator's host-level # evaluates its own `nixpkgs` instance, so the operator's host-level
# `nixpkgs.config.allowUnfreePredicate` does not propagate into here — # `nixpkgs.config.allowUnfreePredicate` does not propagate into here —
# we have to allow it inside the container's config as well. # we have to allow it inside the container's config as well.
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "claude-code" ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "claude-code" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
hyperhive hyperhive
claude-code claude-code
bashInteractive bashInteractive
coreutils-full coreutils-full
# procps for pkill — used by the web UI's /api/cancel to SIGINT the # procps for pkill — used by the web UI's /api/cancel to SIGINT the
# in-flight claude turn. # in-flight claude turn.
procps procps
]; ];
# Git is needed by claude's Bash tool (for the agent <-> manager config # Git is needed by claude's Bash tool (for the agent <-> manager config
# request flow) and by hive-c0re's own setup_applied / setup_proposed. # request flow) and by hive-c0re's own setup_applied / setup_proposed.
# The per-agent `applied/<name>/flake.nix` overrides `user.name` and # The per-agent `applied/<name>/flake.nix` overrides `user.name` and
# `user.email` with the agent's identity — values here are `mkDefault` # `user.email` with the agent's identity — values here are `mkDefault`
# so the per-agent override wins without needing `mkForce`. # so the per-agent override wins without needing `mkForce`.
programs.git = { programs.git = {
enable = true; enable = true;
config = { config = {
user = { user = {
name = lib.mkDefault "hyperhive"; name = lib.mkDefault "hyperhive";
email = lib.mkDefault "hyperhive@local"; email = lib.mkDefault "hyperhive@local";
};
init.defaultBranch = lib.mkDefault "main";
}; };
init.defaultBranch = lib.mkDefault "main";
}; };
# claude's Bash tool refuses to run without a POSIX shell + $SHELL set.
environment.variables.SHELL = "${pkgs.bashInteractive}/bin/bash";
system.stateVersion = "25.11";
}; };
# claude's Bash tool refuses to run without a POSIX shell + $SHELL set.
environment.variables.SHELL = "${pkgs.bashInteractive}/bin/bash";
system.stateVersion = "25.11";
} }