Add Home Manager runtimePackages/environment options that feed the gateway wrapper without polluting the user PATH. Link the same runtime package set into Codex's isolated agent home so shell calls from the Codex harness see Nix-managed plugin and helper CLIs. Tests: ./scripts/check-flake-lock-owners.sh; nix flake show --accept-flake-config; nix build --accept-flake-config .#checks.aarch64-darwin.ci --no-link; nix build --accept-flake-config .#checks.aarch64-darwin.qmd-runtime .#checks.aarch64-darwin.bin-surface .#checks.aarch64-darwin.package-contents --no-link; nix eval --accept-flake-config .#checks.x86_64-linux.default-instance.drvPath; ./scripts/hm-activation-macos.sh
67 lines
1.9 KiB
Nix
67 lines
1.9 KiB
Nix
{
|
|
description = "nix-openclaw macOS Home Manager activation test";
|
|
|
|
inputs = {
|
|
nix-openclaw.url = "github:openclaw/nix-openclaw";
|
|
nixpkgs.follows = "nix-openclaw/nixpkgs";
|
|
home-manager.follows = "nix-openclaw/home-manager";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
home-manager,
|
|
nix-openclaw,
|
|
...
|
|
}:
|
|
let
|
|
system = "aarch64-darwin";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ nix-openclaw.overlays.default ];
|
|
};
|
|
in
|
|
{
|
|
homeConfigurations.hm-test = home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [
|
|
nix-openclaw.homeManagerModules.openclaw
|
|
(
|
|
{ ... }:
|
|
{
|
|
home = {
|
|
username = "runner";
|
|
homeDirectory = "/tmp/hm-activation-home";
|
|
stateVersion = "23.11";
|
|
};
|
|
|
|
programs.openclaw = {
|
|
enable = true;
|
|
installApp = false;
|
|
runtimePackages = [ pkgs.jq ];
|
|
environment.OPENCLAW_TEST_SECRET = "/tmp/openclaw-secret";
|
|
instances.default = {
|
|
gatewayPort = 18999;
|
|
logPath = "/tmp/hm-activation-home/.openclaw/openclaw-gateway.log";
|
|
launchd.label = "com.steipete.openclaw.gateway.hm-test";
|
|
config = {
|
|
logging = {
|
|
level = "debug";
|
|
file = "/tmp/hm-activation-home/.openclaw/openclaw-gateway.log";
|
|
};
|
|
gateway = {
|
|
mode = "local";
|
|
auth = {
|
|
token = "hm-activation-test-token";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
)
|
|
];
|
|
};
|
|
};
|
|
}
|