more nbot stuff

This commit is contained in:
ari committed 2026-11-03 19:21:50 -05:00
1 parent 2d09b6c69f
commit a60b842ee2
11 files changed
+69 -16

No files matched your search

Generated
+4 -4
View File
@@ -2338,11 +2338,11 @@
]
},
"locked": {
"lastModified": 1793737222,
"narHash": "sha256-fgVn5aGit0sXhbI3NsZ39rzsrTJuqd0yoBp68+u+B24=",
"lastModified": 1793743562,
"narHash": "sha256-9Uez0aT7Z7mXCkkcXnq+F0F1oYCMAWLhUu7G6Wtldls=",
"ref": "refs/heads/main",
"rev": "7a6dc00d41761a7b1a0e0022d9b9060fa96ee477",
"revCount": 79,
"rev": "38c9ec8a69b344025d5b209cfe41b96506327139",
"revCount": 90,
"type": "git",
"url": "ssh://git@github.com/asosnovsky/nbot.git"
},
+1
View File
@@ -221,6 +221,7 @@
nbot-slack = ./secrets/nbot-slack.age;
nbot-goose = ./secrets/nbot-goose.age;
nbot-cluster = ./secrets/nbot-cluster.age;
nbot-cluster-hl-fws1 = ./secrets/nbot-cluster-hl-fws1.age;
};
inherit
hyprlauncher
+22 -6
View File
@@ -1,11 +1,11 @@
{ config, lib, pkgs, nbot, skyg-secrets, ... }:
{ config, lib, pkgs, skyg-secrets, ... }:
let
ports = { cluster = 7946; };
homes = "/data/nbot";
secrets = [ "nbot-slack" "nbot-goose" "nbot-cluster" ];
settings = {
# The system each container boots; updated on every rebuild.
system = "${nbot.packages.${pkgs.stdenv.hostPlatform.system}.agent}";
# The system each container boots (nbot's agent + gh); updated on every rebuild.
system = "${config.skyg.nixos.server.services.nbot-agent.system}";
machines_dir = "/var/lib/machines";
state_dir = "/var/lib/nbot";
agent_cwd = "/root";
@@ -23,6 +23,8 @@ let
OPENROUTER_API_KEY = "$OPENROUTER_API_KEY";
CLAUDE_CODE_OAUTH_TOKEN = "$CLAUDE_CODE_OAUTH_TOKEN";
COMMAND_CODE_API_KEY = "$COMMAND_CODE_API_KEY";
# Every agent can use this PAT, so anyone who can prompt one can too.
GH_TOKEN = "$GH_TOKEN";
};
model_providers = [
@@ -30,14 +32,28 @@ let
id = "claude-acp";
name = "Claude ACP (Ari Credentials)";
key_env = "CLAUDE_CODE_OAUTH_TOKEN";
models = [ "default" "sonnet" "haiku" ];
models = [ "default" "sonnet" "haiku" "opus" ];
users = [ "U0CBGSS4U6A" ];
}
{
id = "custom_commandcode";
name = "Command Code";
key_env = "COMMAND_CODE_API_KEY";
models = [ "deepseek/deepseek-v4-flash" ];
models = [
"deepseek/deepseek-v4-flash"
"minimax/minimax-m3.1-flash"
"minimaxai/minimax-m3"
"claude-opus-5-5"
"claude-sonnet-5-5"
"claude-haiku-5-5"
"reflection/beam:free"
"moonshotai/kimi-k3"
"moonshotai/kimi-k2.7-code"
"zai-org/glm-5.3"
"z-ai/glm-5.3-flash"
"xai/grok-4.7"
"gpt-6.1-sol"
];
}
];
@@ -49,7 +65,7 @@ let
drives = [{ path = homes; reserve = "40G"; }];
cluster = {
secret = "$CLUSTER_SECRET";
node_secrets = { hl-fws1 = "$HL_FWS1_CLUSTER_SECRET"; };
listen = ":${toString ports.cluster}";
};
+6 -5
View File
@@ -1,9 +1,9 @@
{ config, pkgs, nbot, skyg-secrets, ... }:
{ config, pkgs, skyg-secrets, ... }:
let
homes = "/var/lib/nbot/homes";
settings = {
# The system each container boots; updated on every rebuild.
system = "${nbot.packages.${pkgs.stdenv.hostPlatform.system}.agent}";
# The system each container boots (nbot's agent + gh); updated on every rebuild.
system = "${config.skyg.nixos.server.services.nbot-agent.system}";
machines_dir = "/var/lib/machines";
state_dir = "/var/lib/nbot";
agent_cwd = "/root";
@@ -23,14 +23,15 @@ let
# from the master. Trusts the first certificate it sees (saved in
# state_dir/master.fingerprint); pin it in master_fingerprint if wanted.
cluster = {
secret = "$CLUSTER_SECRET";
name = "hl-fws1";
master = "wss://fwdesk.lab.internal:7946";
master_fingerprint = "ce08c6b0f3aec855cc8b936d81449c1a34074d181089b26acbdddacfca60af1d";
};
};
in
{
age.secrets.nbot-cluster = {
file = skyg-secrets.nbot-cluster;
file = skyg-secrets.nbot-cluster-hl-fws1;
owner = "root";
mode = "0400";
};
+6
View File
@@ -14,6 +14,7 @@ services/
├── bazel-build.nix # skyg.nixos.server.services.bazel-build — NativeLink Bazel build server for slackerbot containers
├── audiobookshelf.nix # skyg.nixos.server.services.audiobookshelf — audiobook/podcast server
├── jellyfin.nix # skyg.nixos.server.services.jellyfin — media server (uid/gid 7777)
├── nbot-agent.nix # skyg.nixos.server.services.nbot-agent — nbot's agent system + gh, for nbot's `system`
├── signal-cli.nix # skyg.nixos.server.services.signal-cli — signal-cli HTTP daemon (Hermes Signal bridge)
├── colibri.nix # skyg.nixos.server.services.colibri — coli serve HTTP API (GLM-5.2/OLMoE local inference)
└── comfyui/ # skyg.nixos.server.services.comfyui — ComfyUI with ROCm/CUDA GPU support
@@ -67,6 +68,10 @@ services/
own `/root/.cache/bazelisk`. Upstream Bazel only runs on NixOS through
`programs.nix-ld`, enabled on the host and in containers. Bump `bazelVersion` and
`bazelSha256` together.
- **`nbot-agent.nix`** adds `gh` to nbot's agent system from this repo, leaving the nbot
repo unchanged. `gh` reads `GH_TOKEN` from `agent_env`, and git over HTTPS to github.com
uses it through `gh`. Every container gets that token (chosen on purpose, 2026-11-03),
so anyone who can prompt an agent can use it or ask it to print the token.
- **`colibri.nix`** runs `coli serve` (colibrì's OpenAI-compatible API) as a native systemd
service. `package` picks the backend (`pkgs.colibri`
cpu / `pkgs.colibri-rocm`); `environmentFile` supplies `COLI_API_KEY` via agenix instead of
@@ -79,6 +84,7 @@ skyg.nixos.server.services.ai.enable
skyg.nixos.server.services.audiobookshelf.{enable,package,configDir,dataDir}
skyg.nixos.server.services.bazel-build.{enable,cpuCount,cacheGB,port,agentSystem,binds}
skyg.nixos.server.services.jellyfin.enable
skyg.nixos.server.services.nbot-agent.system
skyg.nixos.server.services.signal-cli.{enable,host,port,configDir,account,environmentFile,openFirewall}
skyg.nixos.server.services.colibri.{enable,package,model,host,port,environmentFile,openFirewall,...}
skyg.nixos.server.services.comfyui.{enable,mode,port,openFirewall}
@@ -7,6 +7,7 @@
./colibri.nix
./comfyui
./jellyfin.nix
./nbot-agent.nix
./signal-cli.nix
];
}
@@ -0,0 +1,27 @@
# nbot's agent system with our additions. Use it for nbot's `system`.
{ lib, nbot, ... }:
with lib;
let
agentModule = { pkgs, ... }: {
environment.systemPackages = [ pkgs.gh ];
# gh reads GH_TOKEN (from agent_env); git over HTTPS uses it through gh.
programs.git = {
enable = true;
config.credential."https://github.com".helper = "!${pkgs.gh}/bin/gh auth git-credential";
};
};
in
{
options.skyg.nixos.server.services.nbot-agent.system = mkOption {
description = "nbot's agent system with gh added. Use for nbot's `system`.";
readOnly = true;
type = types.package;
default = (nbot.nixosConfigurations.agent.extendModules {
modules = [ agentModule ];
}).config.system.build.toplevel;
# Keeps the manual from building it on every host.
defaultText = literalExpression "nbot agent + gh";
};
}
+2 -1
View File
@@ -41,7 +41,8 @@ in
# nbot (master on fwdesk, worker on fws1)
"secrets/nbot-slack.age".publicKeys = [ ari fwdesk ];
"secrets/nbot-goose.age".publicKeys = [ ari fwdesk ];
"secrets/nbot-cluster.age".publicKeys = [ ari fwdesk fws1 ];
"secrets/nbot-cluster.age".publicKeys = [ ari fwdesk ];
"secrets/nbot-cluster-hl-fws1.age".publicKeys = [ ari fws1 ];
# Buzz stack env (minipc1)
"secrets/buzz-env.age".publicKeys = [ ari minipc1 ];
Binary file not shown.
Binary file not shown.
Binary file not shown.