deploy: host config from /etc/vanlink.conf (hosts/<hostname>.conf)
deploy.conf is replaced by one versioned file per host plus an example. deploy.sh validates the config, renders every template with a generic token loop, refuses to install output with leftover @TOKENs and gains --check/--templates. LAN_USB_IFACE is renamed LAN_IFACE. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# hosts/van.conf — FriendlyElec NanoPi R5C, hostname "van" (Armbian).
|
||||
# /etc/vanlink.conf -> this file. See hosts/vanlink.conf.example for the variable list.
|
||||
|
||||
WIFI_5G_IFACE=wlp1s0 # MediaTek MT7925E (PCIe); also carries the 2.4GHz AP
|
||||
WIFI_2G_IFACE=wlx3c3332002066
|
||||
LAN_IFACE=enP1p17s0
|
||||
STARLINK_IFACE=enP2p33s0
|
||||
WIFI_WAN_IFACE=wlan0 # not present on this host (kept for the failover config)
|
||||
ONBOARD_LAN_IFACE=
|
||||
|
||||
GATEWAY_IP="10.42.1.1"
|
||||
GATEWAY_PREFIX="24"
|
||||
GATEWAY_NETWORK="10.42.1.0/24"
|
||||
DHCP_RANGE_START="10.42.1.10"
|
||||
DHCP_RANGE_END="10.42.1.254"
|
||||
DNS_RESOLVERS="1.1.1.1 8.8.8.8"
|
||||
|
||||
MODEM_USB_VENDOR=2c7c
|
||||
NVME_DEVICE=
|
||||
NVME_FS_DEVICE=
|
||||
|
||||
USB_BACKUP_ROOT_PART=
|
||||
USB_BACKUP_MOUNT=
|
||||
SD_BACKUP_UUID=39118305-4927-47a4-acc7-ba022f37af22
|
||||
|
||||
ENABLE_COCKPIT=0
|
||||
ENABLE_LI3=1
|
||||
ENABLE_NVME_WATCH=0 # no NVMe on this board
|
||||
ENABLE_HA=1
|
||||
ENABLE_FRIGATE=1
|
||||
@@ -0,0 +1,41 @@
|
||||
# hosts/vanlink.conf.example — reference for /etc/vanlink.conf.
|
||||
#
|
||||
# Each host has hosts/<hostname>.conf (hostname -s) in this repo, and
|
||||
# /etc/vanlink.conf is a symlink to it:
|
||||
# sudo ln -sfn "$PWD/hosts/$(hostname -s).conf" /etc/vanlink.conf
|
||||
# Plain KEY=value (it is sourced by bash). NO SECRETS — this file is in git.
|
||||
# Validate without root: ./deploy.sh --check hosts/<hostname>.conf
|
||||
# Find interface names with `ip -br link` (wired) / `iw dev` (wifi); USB IDs with lsusb.
|
||||
|
||||
# --- Interfaces -------------------------------------------------------------
|
||||
WIFI_5G_IFACE=wlp1s0 # 5GHz AP radio (hostapd)
|
||||
WIFI_2G_IFACE=wlx000000000000 # 2.4GHz AP radio (hostapd-2g)
|
||||
LAN_IFACE=enp1s0 # wired LAN port, bridged into br0
|
||||
STARLINK_IFACE=enp2s0 # Starlink uplink (NetworkManager WAN)
|
||||
WIFI_WAN_IFACE=wlan0 # Wi-Fi uplink (NetworkManager WAN)
|
||||
ONBOARD_LAN_IFACE= # optional: extra onboard LAN port bridged into br0 (e.g. eth0); empty = none
|
||||
|
||||
# --- Addressing ---------------------------------------------------------------
|
||||
GATEWAY_IP="10.42.9.1"
|
||||
GATEWAY_PREFIX="24"
|
||||
GATEWAY_NETWORK="10.42.9.0/24"
|
||||
DHCP_RANGE_START="10.42.9.10"
|
||||
DHCP_RANGE_END="10.42.9.254"
|
||||
DNS_RESOLVERS="1.1.1.1 8.8.8.8"
|
||||
|
||||
# --- Hardware -----------------------------------------------------------------
|
||||
MODEM_USB_VENDOR=2c7c # cellular modem USB vendor id
|
||||
NVME_DEVICE= # only when ENABLE_NVME_WATCH=1, e.g. nvme0
|
||||
NVME_FS_DEVICE= # only when ENABLE_NVME_WATCH=1, e.g. /dev/nvme0n1p2
|
||||
|
||||
# --- Backup (read by failover/sync-*-backup.sh; leave empty if unused) ----------
|
||||
USB_BACKUP_ROOT_PART= # sync-usb-backup.sh: partition to mount, e.g. /dev/sda2
|
||||
USB_BACKUP_MOUNT= # sync-usb-backup.sh: local mount point, or host:/path for NFS
|
||||
SD_BACKUP_UUID= # sync-sd-backup.sh: filesystem UUID of the backup SD card
|
||||
|
||||
# --- Feature flags (0 or 1) ---------------------------------------------------
|
||||
ENABLE_COCKPIT=0 # Cockpit "Van Router" plugin
|
||||
ENABLE_LI3=0 # Li3 house-battery BLE -> MQTT service
|
||||
ENABLE_NVME_WATCH=0 # NVMe timeout watchdog (needs an NVMe drive)
|
||||
ENABLE_HA=0 # Home Assistant + ESPHome (podman quadlets)
|
||||
ENABLE_FRIGATE=0 # Frigate NVR (podman quadlet)
|
||||
@@ -0,0 +1,30 @@
|
||||
# hosts/wan.conf — Raspberry Pi 5, hostname "wan".
|
||||
# /etc/vanlink.conf -> this file. See hosts/vanlink.conf.example for the variable list.
|
||||
|
||||
WIFI_5G_IFACE=wlxc83a35a4ee55 # Realtek RTL8852BU, rtw89
|
||||
WIFI_2G_IFACE=wlxf4f26d1760a7 # D-Link DWA-171, RTL8821CU
|
||||
LAN_IFACE=enx00e04c331140
|
||||
STARLINK_IFACE=enx3c8cf861752b # TrendNet USB dongle
|
||||
WIFI_WAN_IFACE=wlan0
|
||||
ONBOARD_LAN_IFACE=eth0
|
||||
|
||||
GATEWAY_IP="10.42.0.1"
|
||||
GATEWAY_PREFIX="24"
|
||||
GATEWAY_NETWORK="10.42.0.0/24"
|
||||
DHCP_RANGE_START="10.42.0.10"
|
||||
DHCP_RANGE_END="10.42.0.254"
|
||||
DNS_RESOLVERS="1.1.1.1 8.8.8.8"
|
||||
|
||||
MODEM_USB_VENDOR=2c7c
|
||||
NVME_DEVICE=
|
||||
NVME_FS_DEVICE=
|
||||
|
||||
USB_BACKUP_ROOT_PART=/dev/sda2
|
||||
USB_BACKUP_MOUNT=10.42.0.44:/media/andreas/writable-nvme
|
||||
SD_BACKUP_UUID=
|
||||
|
||||
ENABLE_COCKPIT=0
|
||||
ENABLE_LI3=0
|
||||
ENABLE_NVME_WATCH=0 # boots from mmcblk0; no NVMe fitted
|
||||
ENABLE_HA=1
|
||||
ENABLE_FRIGATE=0
|
||||
Reference in New Issue
Block a user