This commit is contained in:
müde 2026-05-14 22:27:03 +02:00
parent 6e7fd2e897
commit 2a98e3ca87
4 changed files with 21 additions and 6 deletions

17
flake.lock generated
View file

@ -59,10 +59,27 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1778672786,
"narHash": "sha256-Blg88K1jwG+P0Mr27+rKMFCufdrWkV3wWh9AdYtz0FQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eef00dfd8a712b34af845f9350bac681b1228bd1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"naersk": "naersk", "naersk": "naersk",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
} }
}, },

View file

@ -31,8 +31,8 @@ impl Broker {
std::fs::create_dir_all(parent) std::fs::create_dir_all(parent)
.with_context(|| format!("create db parent {}", parent.display()))?; .with_context(|| format!("create db parent {}", parent.display()))?;
} }
let conn = Connection::open(path) let conn =
.with_context(|| format!("open broker db {}", path.display()))?; Connection::open(path).with_context(|| format!("open broker db {}", path.display()))?;
conn.execute_batch(SCHEMA).context("apply broker schema")?; conn.execute_batch(SCHEMA).context("apply broker schema")?;
Ok(Self { Ok(Self {
conn: Mutex::new(conn), conn: Mutex::new(conn),

View file

@ -34,8 +34,7 @@ impl Coordinator {
std::fs::create_dir_all(&agent_dir) std::fs::create_dir_all(&agent_dir)
.with_context(|| format!("create agent dir {}", agent_dir.display()))?; .with_context(|| format!("create agent dir {}", agent_dir.display()))?;
let socket_path = Self::socket_path(name); let socket_path = Self::socket_path(name);
let socket = let socket = agent_server::start(name.to_owned(), socket_path, self.broker.clone()).await?;
agent_server::start(name.to_owned(), socket_path, self.broker.clone()).await?;
self.agents.lock().unwrap().insert(name.to_owned(), socket); self.agents.lock().unwrap().insert(name.to_owned(), socket);
Ok(agent_dir) Ok(agent_dir)
} }

View file

@ -2,8 +2,7 @@
{ {
boot.isNspawnContainer = true; boot.isNspawnContainer = true;
nixpkgs.config.allowUnfreePredicate = nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "claude-code" ];
pkg: builtins.elem (pkgs.lib.getName pkg) [ "claude-code" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
hyperhive hyperhive