Commit graph

36 commits

Author SHA1 Message Date
262887e5ea fix(openclaw): bypass device pairing requirement
- Change gateway auth mode from "none" to "token", as "none" is no longer supported and enforces device pairing.
- Provide a static OPENCLAW_GATEWAY_TOKEN in the environment to allow local subagents to bypass pairing automatically.
2026-03-20 21:49:17 +01:00
562ec5526c feat(openclaw): add openclaw-superpowers extension
- Add openclaw-superpowers as a flake input.
- Implement superpowers option in openclaw-podman module.
- Automate skill symlinking, state directory creation, and cron registration.
- Ensure PyYAML is installed within the container via a post-startup service.
- Enable superpowers in the main configuration.
2026-03-20 15:20:51 +01:00
9e206f08bd Cleanup 2026-03-19 21:59:38 +01:00
577dd607b7 feat(openclaw): add github_token to sops secrets and template 2026-03-19 21:41:01 +01:00
9803eebb1d Merge branch 'main' into feat/headscale 2026-03-19 20:18:10 +00:00
1c28db5f8e feat(headscale): add self-hosted Tailscale control server
New module: modules/headscale.nix
- Headscale service listening on localhost with Nginx reverse proxy
- SQLite database (appropriate for personal use)
- Tailscale public DERP relays for NAT traversal fallback
- MagicDNS enabled with Mullvad/Quad9 upstream resolvers
- Optional OIDC authentication (Google, GitHub, etc.)
- Default auth: pre-shared API keys (headscale apikeys create)
- Added to backup paths (SQLite DB)
- headscale CLI tool added to system packages

Configuration:
- Domain: vpn.ashisgreat.xyz
- OIDC disabled by default (documented how to enable in configuration.nix)

To register a device after deploying:
  sudo headscale apikeys create
  tailscale up --login-server=https://vpn.ashisgreat.xyz --authkey=<key>

DNS record needed: vpn.ashisgreat.xyz → VPS IP
2026-03-19 15:39:56 +00:00
790501d290 feat(nginx): add rate limiting with per-domain overrides
- Global rate limit: 10 req/s with burst of 20
- Connection limit: 30 concurrent per IP
- Per-domain override support (requests, burst, enable/disable)
- SearXNG gets higher limits (20/40) to tolerate bot traffic
- Returns 429 when rate limited
2026-03-19 15:08:34 +00:00
9a0900c81a fix(backup): correct backup paths and add missing services
- Replace stale /var/lib/bitwarden_rs with /var/lib/vaultwarden (correct DB path)
- Add /var/lib/private/AdGuardHome (DNS config, filters, query logs)
- Add /var/lib/sops-nix (age decryption key — critical for secret recovery)
- Add /var/lib/crowdsec (security engine state and decisions)
- Keep /var/backup/vaultwarden (built-in sqlite backup snapshots)

Note: Forgejo data path is still added dynamically by the forgejo module.
Note: OpenClaw Podman volume needs separate handling (named volume path on host).
2026-03-19 14:50:24 +00:00
fbea02867e feat(nginx): add security headers with per-domain CSP
- Add HSTS (6 months, includeSubDomains, preload-ready)
- Add X-Content-Type-Options: nosniff
- Add Permissions-Policy (disable camera/mic/geolocation)
- Add Cross-Origin-Resource-Policy: same-origin
- Add Cross-Origin-Opener-Policy: same-origin
- Add configurable Content-Security-Policy per domain

Per-service CSP tuning:
- SearXNG: null (handles its own CSP in settings.yml)
- Forgejo: relaxed (unsafe-inline/eval for code highlighting)
- Vaultwarden: relaxed (unsafe-eval for WebCrypto vault)

Fixes: missing CSP, HSTS, X-Content-Type-Options headers
2026-03-19 13:42:41 +00:00
6354a030f0 feat(openclaw): add Forgejo integration secrets to SOPS template 2026-03-19 14:32:05 +01:00
837e71b69d Add Forgejo Actions Runner with sops secrets 2026-03-19 14:05:51 +01:00
b6abc4a1cf Configure zram swap with zstd and 50% memory limit 2026-03-19 00:22:48 +01:00
f646c091cc Harden SSH and enable post-quantum key exchange (sntrup761x25519-sha512) for system and Forgejo 2026-03-19 00:05:12 +01:00
abf2080f91 Add auto-update and maintenance options to system module 2026-03-19 00:03:58 +01:00
6e9de4c189 Add Forgejo self-hosted Git service with Nginx, PostgreSQL, and Restic backups 2026-03-18 23:32:01 +01:00
e9652aaaa6 Cleanup 2026-03-18 21:27:41 +01:00
9189a9c49d feat(config): enable AdGuard Home module with two clients
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 19:09:59 +01:00
638d588d81 fix(backup): use new B2 bucket for restic repository
Switch to nixos-vps-backup2 bucket to resolve password mismatch
with existing repository.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 18:10:54 +01:00
70ef850994 feat: enable B2 backups
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 14:17:10 +01:00
fd056367d2 feat: add backup module with Restic + Backblaze B2
- Encrypted backups to B2
- Configurable retention (daily/weekly/monthly)
- SOPS-managed credentials
- Automatic pruning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 14:11:11 +01:00
e0de37b15f fix: simplify CrowdSec module
Remove LAPI server config causing null coercion error.
Detection-only mode for now; bouncer can be added later.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 13:50:44 +01:00
211693ef3b feat: add CrowdSec security module
- Wraps native NixOS CrowdSec service
- Configures SSH and nginx log acquisition
- Installs linux/nginx/sshd hub collections
- Supports IP whitelisting and ban duration config
- Optional nginx bouncer integration (requires manual API key setup)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 13:44:36 +01:00
db4f0f8f61 fix: remove duplicate SOPS declaration, clean up unused param
- Remove redundant vaultwarden_admin_token from configuration.nix
  (already declared in module)
- Remove unused pkgs parameter from vaultwarden module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 12:37:09 +01:00
45b6997fac chore: disable Vaultwarden signup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 12:12:19 +01:00
ea7ca739ba feat: enable Vaultwarden in configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 12:08:22 +01:00
a87fd37489 Add Brave Search web search to OpenClaw
- Enable web_search tool with Brave provider
- Add openclaw_brave_api_key secret to SOPS configuration
- Add BRAVE_API_KEY to openclaw.env template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 02:50:09 +01:00
ae5e61cb6e Fix openclaw config syntax - use external json file
- Move openclaw config to separate json file
- Reference file directly in podman module
- Remove problematic builtins.toJSON with nested arrays

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:37:46 +01:00
a595445bd2 Convert Openclaw to Podman container
- Use official ghcr.io/openclaw/openclaw image
- configure via JSON config file
- containerized for better isolation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 01:35:02 +01:00
68240b7319 Set openclaw as owner of sops template 2026-03-17 21:32:37 +01:00
1d11816a55 Remove OpenAI, use z.ai for OpenClaw
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:59:05 +01:00
1748360922 Add z.ai API key to OpenClaw secrets
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:55:40 +01:00
3a885463f0 Add OpenClaw AI Agent module
- Systemd service running OpenClaw gateway
- Configurable via sops secrets
- Runs on localhost:18789

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:55:15 +01:00
24d01ac630 Add modular service configuration with SearXNG and Nginx
- Create modules/ directory with reusable NixOS modules
- Add system module for main user configuration
- Add podman module for rootless container support
- Add nginx module with automatic Let's Encrypt SSL
- Add searxng module with Anubis AI firewall protection
- Configure SearXNG at search.ashisgreat.xyz
- Enable nginx reverse proxy with HTTPS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 19:47:43 +01:00
5dcb85e56d Add sops-nix for secrets management
- Add flake.nix with sops-nix input
- Configure sops with age key encryption
- Add .sops.yaml template for age key configuration
- Create secrets/ directory for encrypted secrets
- Add .gitignore for age keys and nix result symlinks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 19:34:10 +01:00
58905b7666 Add security hardening and basic VPS setup
- Enable firewall with only SSH port 22 open, disable ping
- Harden SSH: disable root login and password auth
- Create non-root user 'ashie' with sudo access
- Add htop and tmux to system packages
- Enable automatic NixOS updates (no auto-reboot)
- Fix hostname syntax error (missing closing quote)
- Remove duplicate nixos/ subdirectory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 19:28:26 +01:00
System administrator
2e768daefa Initial commit 2026-03-17 18:20:35 +00:00