mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-17 06:04:55 +00:00
feat: hermes frame mog openclaw
This commit is contained in:
parent
c882f44a0b
commit
bad6fc6733
15 changed files with 279 additions and 222 deletions
|
|
@ -21,7 +21,7 @@
|
|||
./mise.nix
|
||||
./migration.nix
|
||||
./nvim.nix
|
||||
./openclaw.nix
|
||||
./hermes.nix
|
||||
./prompt.nix
|
||||
./skills.nix
|
||||
./scripts.nix
|
||||
|
|
|
|||
12
home/hermes.nix
Normal file
12
home/hermes.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
hostConfig,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.mkIf hostConfig.isLinux {
|
||||
home.packages = [
|
||||
inputs.hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
hostConfig,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
openClawVersion = "2026.4.5";
|
||||
npmDir = "${config.xdg.dataHome}/npm";
|
||||
in
|
||||
lib.mkIf hostConfig.isLinux {
|
||||
home.packages = [
|
||||
inputs.openClaw.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
|
||||
home.activation.installOpenClaw = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
export PATH="${lib.makeBinPath [ pkgs.nodejs_22 pkgs.coreutils ]}:$PATH"
|
||||
export NPM_CONFIG_USERCONFIG="${config.xdg.configHome}/npm/npmrc"
|
||||
export XDG_DATA_HOME="${config.xdg.dataHome}"
|
||||
export XDG_CACHE_HOME="${config.xdg.cacheHome}"
|
||||
|
||||
OPENCLAW_DIR="${npmDir}/lib/node_modules/openclaw"
|
||||
INSTALLED=$(npm ls -g openclaw --depth=0 --json 2>/dev/null | ${pkgs.jq}/bin/jq -r '.dependencies.openclaw.version // empty')
|
||||
HEALTHY=true
|
||||
[ "$INSTALLED" != "${openClawVersion}" ] && HEALTHY=false
|
||||
[ ! -d "$OPENCLAW_DIR/node_modules/grammy" ] && HEALTHY=false
|
||||
if [ "$HEALTHY" = false ]; then
|
||||
npm install -g "openclaw@${openClawVersion}" --force 2>/dev/null || true
|
||||
fi
|
||||
'';
|
||||
|
||||
home.file.".openclaw/workspace/SOUL.md".source = ../config/openclaw/SOUL.md;
|
||||
home.file.".openclaw/workspace/TOOLS.md".source = ../config/openclaw/TOOLS.md;
|
||||
home.file.".openclaw/workspace/HEARTBEAT.md".source = ../config/openclaw/HEARTBEAT.md;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue