homelab framework module init (everything is a mess)
This commit is contained in:
parent
0347f4d325
commit
bcbcc8b17b
94 changed files with 7289 additions and 436 deletions
41
scripts/generate-docs.sh
Executable file
41
scripts/generate-docs.sh
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
# scripts/generate-docs.sh
|
||||
#!/bin/bash
|
||||
|
||||
echo "# Homelab Global Configuration Documentation"
|
||||
echo
|
||||
echo "This document describes the global configuration system for the NixOS homelab."
|
||||
echo
|
||||
echo "## Available Services"
|
||||
echo
|
||||
|
||||
# List all service modules
|
||||
find modules/nixos/services -name "*.nix" | while read -r file; do
|
||||
service=$(basename "$file" .nix)
|
||||
echo "### $service"
|
||||
echo
|
||||
# Extract description from the module
|
||||
grep -m1 "mkEnableOption" "$file" | sed 's/.*mkEnableOption "\([^"]*\)".*/\1/' || echo "Service module for $service"
|
||||
echo
|
||||
done
|
||||
|
||||
echo "## Configuration Examples"
|
||||
echo
|
||||
echo "### Basic Media Server Setup"
|
||||
echo '```nix'
|
||||
echo 'media-server = { ... }: {'
|
||||
echo ' homelab.global = {'
|
||||
echo ' enable = true;'
|
||||
echo ' hostname = "media-server";'
|
||||
echo ' domain = "homelab.local";'
|
||||
echo ' };'
|
||||
echo ' services.jellyfin.enable = true;'
|
||||
echo '};'
|
||||
echo '```'
|
||||
echo
|
||||
|
||||
echo "### Monitoring Configuration"
|
||||
echo '```nix'
|
||||
echo 'monitoring = { nodes, ... }: {'
|
||||
echo ' services.prometheus.scrapeConfigs = collectMonitoringEndpoints nodes;'
|
||||
echo '};'
|
||||
echo '```'# modules/global-config.nix
|
||||
Loading…
Add table
Add a link
Reference in a new issue