diff options
author | AlphaJack | 2021-07-28 10:25:01 +0200 |
---|---|---|
committer | AlphaJack | 2021-07-28 10:46:19 +0200 |
commit | d5fcdb5ebe7471fdc6cf3337e4848f524bbe3ad8 (patch) | |
tree | 7fdea95cae9caab56d1858e7dc09d3f682378a17 | |
download | aur-d5fcdb5ebe7471fdc6cf3337e4848f524bbe3ad8.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | mkinitcpio-zerotier.install | 21 |
3 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e54f44bd2d1e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = mkinitcpio-zerotier + pkgdesc = mkinitcpio hook that initialises ZeroTier One to assist in the remote unlocking of encrypted partitions + pkgver = 1.0 + pkgrel = 1 + url = https://github.com/AlphaJack/mkinitcpio-zerotier + install = mkinitcpio-zerotier.install + arch = any + license = GPL3 + depends = mkinitcpio + depends = mkinitcpio-netconf + depends = mkinitcpio-utils + depends = zerotier-one + optdepends = mkinitcpio-tinyssh: SSH server + optdepends = mkinitcpio-dropbear: SSH server + backup = var/lib/zerotier-one/initcpio/config.ini + source = mkinitcpio-zerotier-1.0.tar.gz::https://github.com/AlphaJack/mkinitcpio-zerotier/archive/refs/tags/1.0.tar.gz + sha256sums = 11b2c1d9826e107433798c311475f9af9fed08a1402508233d4ef74e60e0b73b + +pkgname = mkinitcpio-zerotier diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..405df763121e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: AlphaJack <alphajack at tuta dot io> + +pkgname="mkinitcpio-zerotier" +pkgver=1.0 +pkgrel=1 +pkgdesc="mkinitcpio hook that initialises ZeroTier One to assist in the remote unlocking of encrypted partitions" +url="https://github.com/AlphaJack/mkinitcpio-zerotier" +license=("GPL3") +arch=("any") +depends=("mkinitcpio" "mkinitcpio-netconf" "mkinitcpio-utils" "zerotier-one") +optdepends=("mkinitcpio-tinyssh: SSH server" "mkinitcpio-dropbear: SSH server") +source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz") +sha256sums=("11b2c1d9826e107433798c311475f9af9fed08a1402508233d4ef74e60e0b73b") +backup=("var/lib/zerotier-one/initcpio/config.ini") +install="$pkgname.install" + +package(){ + cd "$pkgname-$pkgver" + install -D -m 644 "zerotier_config" "$pkgdir/var/lib/zerotier-one/initcpio/config.ini" + install -D -m 644 "zerotier_hook" "$pkgdir/usr/lib/initcpio/hooks/zerotier" + install -D -m 644 "zerotier_install" "$pkgdir/usr/lib/initcpio/install/zerotier" +} diff --git a/mkinitcpio-zerotier.install b/mkinitcpio-zerotier.install new file mode 100644 index 000000000000..6d3b09a4c281 --- /dev/null +++ b/mkinitcpio-zerotier.install @@ -0,0 +1,21 @@ +post_install(){ + cat <<INFO + +This hook provides connection to a ZeroTier One network to assist in the remote +unlocking of encrypted partitions. To complete the installation follow these steps as root: + +0. Configure a working LAN decryption setup using either "mkinitcpio-tinyssh" or "mkinitcpio-dropbear"; +1. Edit /var/lib/zerotier-one/initcpio/config.ini according to your needs; +2. Add "zerotier" to the "HOOKS" array in /etc/mkinitcpio.conf, placing it before your "tinyssh" or "dropbear" hook; +3. Add "tun" to the "MODULES" array in /etc/mkinitcpio.conf; +4. Rebuild your initial ramdisk by running 'mkinicpio -P'. + +You may also need to authorize your client from https://my.zerotier.com/ the first time it connects after boot. +Be sure to have both your LAN and VPN gateway configured properly, otherwise your device may not be able +to communicate with ZeroTier One servers or be reached by other VPN peers. +It is not required to configure the ZeroTier One in the userspace, but you can do it to check for networking problems +not related to this hook (e.g. UPnP not working in your router). +See the ArchWiki for further readings remote unlocking of encrypted partitions. + +INFO +} |