feat(nix): add Nextcloud Claude Bot integration
- Added configuration for Nextcloud Claude Bot, including NixOS module, secrets management, and example setup files. - Introduced a Python-based HTTP server for handling webhook events and interacting with Nextcloud Talk. - Integrated necessary dependencies and systemd service for seamless operation.
This commit is contained in:
parent
eb10ad018f
commit
bc6091f63f
7 changed files with 728 additions and 0 deletions
31
systems/x86_64-linux/mx/nextcloud-claude-bot/default.nix
Normal file
31
systems/x86_64-linux/mx/nextcloud-claude-bot/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [ ./module.nix ];
|
||||
|
||||
services.nextcloud-claude-bot = {
|
||||
enable = true;
|
||||
nextcloudUrl = "https://nc.hoyer.xyz";
|
||||
botSecretFile = config.sops.secrets."nextcloud-claude-bot/secret".path;
|
||||
allowedUsers = [ "harald" ];
|
||||
};
|
||||
|
||||
sops.secrets."nextcloud-claude-bot/secret" = {
|
||||
sopsFile = ../../../../.secrets/hetzner/nextcloud-claude-bot.yaml;
|
||||
restartUnits = [ "nextcloud-claude-bot.service" ];
|
||||
};
|
||||
|
||||
# Nginx location for Nextcloud to send webhooks to the bot
|
||||
services.nginx.virtualHosts."nc.hoyer.xyz".locations."/_claude-bot/" = {
|
||||
proxyPass = "http://127.0.0.1:8085/";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# Only allow from localhost (Nextcloud on same server)
|
||||
allow 127.0.0.1;
|
||||
deny all;
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue