~tardypad/alpine-system

0c4a231f82ca8477279a2130b4f499c82df5da8e — Damien Tardy-Panis 3 months ago 43e5a00
system-config: add basic WireGuard configuration
M builds/system-config/APKBUILD => builds/system-config/APKBUILD +3 -2
@@ 1,6 1,6 @@
# Maintainer: Damien Tardy-Panis <damien.dev@tardypad.me>
pkgname="system-config"
pkgver=6
pkgver=7
pkgrel=0
pkgdesc="System configurations"
url="https://sr.ht/~tardypad/alpine-system/"


@@ 16,8 16,9 @@ depends="doas
         rsync
         tardypad.me
         vim
         wireguard-tools-wg
         "
install="$pkgname.post-install"
install="$pkgname.post-install $pkgname.post-upgrade"

package() {
  mkdir -p "$pkgdir"

A builds/system-config/files/etc/network/interfaces => builds/system-config/files/etc/network/interfaces +13 -0
@@ 0,0 1,13 @@
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 5.79.109.244/24
        gateway 5.79.109.254

auto wg0
iface wg0 inet static
        requires eth0
        use wireguard
        address 192.168.144.1/24

A builds/system-config/files/etc/wireguard/wg0.conf => builds/system-config/files/etc/wireguard/wg0.conf +7 -0
@@ 0,0 1,7 @@
[Interface]
ListenPort = 51820
PrivateKey = {PRIVATE_KEY}

[Peer]
PublicKey = M+iGn218n/FpYDb58d2NvSZstZ25msxkv11Qc33EYV4=
AllowedIPs = 192.168.144.2/32

M builds/system-config/system-config.post-install => builds/system-config/system-config.post-install +9 -0
@@ 1,5 1,12 @@
#!/bin/sh

list_manual_updates() {
  cat <<- EOF >&2
	* You need to update:
	* - private key of WireGuard interface
	EOF
}

# fix collection permissions after backup upload
# make sure the folder exists beforehand
mkdir -p /home/damien/radicale


@@ 7,3 14,5 @@ chown -R radicale:radicale /home/damien/radicale

rc-update add radicale default
rc-service radicale restart

list_manual_updates

A builds/system-config/system-config.post-upgrade => builds/system-config/system-config.post-upgrade +10 -0
@@ 0,0 1,10 @@
#!/bin/sh

list_manual_updates() {
  cat <<- EOF >&2
	* You need to update:
	* - private key of WireGuard interface
	EOF
}

list_manual_updates