infra/write_homepage_config.py

124 lines
3 KiB
Python

#!/usr/bin/env python3
"""Writes Homepage config files directly into the volume."""
import os
CONFIG_DIR = "/var/lib/docker/volumes/selfhosted-home-diqpg6_homepage_config/_data"
SETTINGS = """title: Manohar's Hub
theme: dark
color: slate
headerStyle: boxed
layout:
Infrastructure:
style: row
columns: 4
Tools:
style: row
columns: 4
Dev:
style: row
columns: 4
Finance & Intel:
style: row
columns: 4
"""
SERVICES = """- Infrastructure:
- Dokploy:
href: https://dokploy.manohargupta.com
description: Docker orchestration
icon: docker.png
- Uptime Kuma:
href: https://status.manohargupta.com
description: Service monitoring
icon: uptime-kuma.png
- Umami:
href: https://analytics.manohargupta.com
description: Web analytics
icon: umami.png
- Traefik:
href: https://dokploy.manohargupta.com
description: Reverse proxy + TLS
icon: traefik.png
- Tools:
- n8n:
href: https://automate.manohargupta.com
description: Workflow automation
icon: n8n.png
- Paperless:
href: https://docs.manohargupta.com
description: Document OCR + search
icon: paperless-ngx.png
- Miniflux:
href: https://feeds.manohargupta.com
description: RSS reader
icon: miniflux.png
- ChangeDetection:
href: https://watch.manohargupta.com
description: Page change monitor
icon: changedetection-io.png
- Dev:
- Forgejo:
href: https://git.manohargupta.com
description: Self-hosted Git
icon: gitea.png
- Code Server:
href: https://code.manohargupta.com
description: Browser IDE
icon: code-server.png
- Apprise:
href: https://notify.manohargupta.com
description: Notification hub
icon: apprise.png
- Finance & Intel:
- Tiger Agent:
href: https://agent.manohargupta.com
description: AI orchestration
icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/heimdall.png
"""
BOOKMARKS = """- Quick Links:
- Namecheap DNS:
- href: https://ap.www.namecheap.com/domains/domaincontrolpanel/manohargupta.com/advancedns
- Hetzner Console:
- href: https://console.hetzner.cloud
- OpenRouter:
- href: https://openrouter.ai/activity
- BotFather:
- href: https://t.me/BotFather
"""
WIDGETS = """- greeting:
text_size: xl
text: "Good morning, Manohar"
- datetime:
text_size: xl
format:
timeStyle: short
dateStyle: short
hourCycle: h23
- search:
provider: google
target: _blank
"""
files = {
"settings.yaml": SETTINGS,
"services.yaml": SERVICES,
"bookmarks.yaml": BOOKMARKS,
"widgets.yaml": WIDGETS,
}
for filename, content in files.items():
path = os.path.join(CONFIG_DIR, filename)
with open(path, "w") as f:
f.write(content)
print(f"Written: {path}")
print("All config files written.")