chore: remove all OpenClaw integration from dotfiles 🔥
OpenClaw is no longer used. Removes flake inputs (nix-openclaw, openclaw-documents), overlays, home-manager modules, config files, docs, and related TODO/gitignore entries.
This commit is contained in:
parent
494bc8a5f4
commit
18ccebc109
11 changed files with 29 additions and 341 deletions
|
|
@ -1,3 +0,0 @@
|
|||
# Copy to openclaw-allow-from.nix (gitignored) and put your Telegram user ID(s) from @userinfobot.
|
||||
# Example:
|
||||
[ 00000000 ]
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Load OPENCLAW_GATEWAY_TOKEN from a file and exec the real gateway.
|
||||
# Install: token in ~/.secrets/openclaw-gateway-token (one line, no newline).
|
||||
set -euo pipefail
|
||||
TOKEN_FILE="${OPENCLAW_GATEWAY_TOKEN_FILE:-$HOME/.secrets/openclaw-gateway-token}"
|
||||
if [ -f "$TOKEN_FILE" ]; then
|
||||
export OPENCLAW_GATEWAY_TOKEN=$(cat "$TOKEN_FILE")
|
||||
fi
|
||||
exec "$@"
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
# OpenClaw (AI assistant gateway) – Telegram, launchd, documents.
|
||||
# Documents (SOUL.md, TOOLS.md, etc.) come from a separate repo via the flake input
|
||||
# openclaw-documents (see flake.nix; override with e.g. github:you/openclaw-documents).
|
||||
# Secrets (not in repo):
|
||||
# ~/.secrets/telegram-bot-token
|
||||
# ~/.secrets/openclaw-gateway-token (one line, gateway auth token)
|
||||
# nixos/home/danny/openclaw-allow-from.nix (gitignored; copy from .example)
|
||||
# After editing, run: darwin-rebuild switch --flake . (from ~/dotfiles/nixos)
|
||||
|
||||
{ config, lib, pkgs, openclaw-documents, ... }:
|
||||
|
||||
let
|
||||
# Telegram user IDs from gitignored file so we don't commit them
|
||||
allowFromPath = ./. + "/openclaw-allow-from.nix";
|
||||
allowFrom = if builtins.pathExists allowFromPath then import allowFromPath else [ ];
|
||||
in
|
||||
{
|
||||
programs.openclaw = {
|
||||
enable = true;
|
||||
# Flake input: use .source (in-repo and separate-repo flakes expose source = ./.)
|
||||
documents = openclaw-documents.source or openclaw-documents.outPath or openclaw-documents;
|
||||
|
||||
config = { };
|
||||
|
||||
instances.default = {
|
||||
enable = true;
|
||||
config = {
|
||||
gateway = {
|
||||
mode = "local";
|
||||
auth.token = ""; # loaded from ~/.secrets/openclaw-gateway-token via wrapper
|
||||
};
|
||||
channels.telegram = {
|
||||
tokenFile = "/Users/danny/.secrets/telegram-bot-token";
|
||||
allowFrom = allowFrom;
|
||||
groups."*" = { requireMention = true; };
|
||||
};
|
||||
};
|
||||
plugins = [
|
||||
# e.g. { source = "github:openclaw/nix-steipete-tools?dir=tools/summarize"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Wrapper loads gateway token from file and execs the real gateway (keeps token out of store)
|
||||
home.file.".local/bin/openclaw-gateway-wrapper" = {
|
||||
source = ./openclaw-gateway-wrapper.sh;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
# TODO: Remove this bloat (see dotfiles TODO.md). Back up as target user so HM can overwrite.
|
||||
home.activation.backupOpenclawBeforeSwitch = lib.hm.dag.entryBefore [ "linkGeneration" ] ''
|
||||
OPENCLAW="${config.home.homeDirectory}/.openclaw"
|
||||
USER="${config.home.username}"
|
||||
if [ -d "$OPENCLAW" ]; then
|
||||
for f in "$OPENCLAW"/workspace/*.md "$OPENCLAW"/openclaw.json; do
|
||||
[ -e "$f" ] && [ ! -L "$f" ] && (sudo -u "$USER" mv -n "$f" "$f.backup" 2>/dev/null || true)
|
||||
done
|
||||
fi
|
||||
'';
|
||||
home.file.".openclaw/openclaw.json".force = true;
|
||||
|
||||
# Override launchd agent to run wrapper so OPENCLAW_GATEWAY_TOKEN is set from file at runtime.
|
||||
# Do not reference config.launchd.agents."..." here (causes infinite recursion).
|
||||
launchd.agents."com.steipete.openclaw.gateway" = lib.mkForce {
|
||||
enable = true;
|
||||
config = {
|
||||
ProgramArguments = [
|
||||
(config.home.homeDirectory + "/.local/bin/openclaw-gateway-wrapper")
|
||||
"${pkgs.openclaw}/bin/openclaw"
|
||||
"gateway"
|
||||
];
|
||||
RunAtLoad = true;
|
||||
KeepAlive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue