2024-06-23 15:10:36 +02:00
|
|
|
## Justfile (https://github.com/casey/justfile)
|
|
|
|
##
|
|
|
|
## Orange Pi 5+ x 3
|
|
|
|
##
|
|
|
|
## Services:
|
|
|
|
## - ArchiveBox
|
|
|
|
## - Caddy web server
|
|
|
|
## - gmcapsuled
|
|
|
|
## - Mastodon auxiliary scripts
|
|
|
|
## - qBittorrent + WireGuard
|
|
|
|
## - Tailscale
|
|
|
|
## - The Lounge IRC
|
|
|
|
|
2024-06-24 21:42:28 +02:00
|
|
|
release := `grep "VERSION_CODENAME" /etc/os-release | awk -F= '{print $2}'`
|
2024-06-23 15:10:36 +02:00
|
|
|
run_user := env_var("USER")
|
|
|
|
archivebox_data := "/nfs/archivebox"
|
|
|
|
archivebox_nfs := "10.0.0.6:/mnt/coffeeNAS/archivebox"
|
|
|
|
|
|
|
|
default: common
|
|
|
|
|
|
|
|
common:
|
|
|
|
sudo apt update
|
|
|
|
sudo apt dist-upgrade -y
|
|
|
|
sudo apt install -y \
|
|
|
|
apt-file \
|
|
|
|
apt-listchanges \
|
|
|
|
apt-utils \
|
|
|
|
atop \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
build-essential \
|
|
|
|
byobu \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
firewalld \
|
|
|
|
git \
|
|
|
|
glances \
|
|
|
|
htop \
|
|
|
|
httpie \
|
|
|
|
ifplugd \
|
|
|
|
iotop \
|
|
|
|
less \
|
|
|
|
libpam-systemd \
|
|
|
|
lynis \
|
|
|
|
man-db \
|
|
|
|
manpages \
|
|
|
|
nfs-common \
|
|
|
|
nmon \
|
|
|
|
pipx \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
2024-06-24 21:42:28 +02:00
|
|
|
rclone \
|
2024-06-23 15:10:36 +02:00
|
|
|
rsync \
|
|
|
|
unattended-upgrades \
|
|
|
|
vim \
|
|
|
|
wget \
|
|
|
|
zsh
|
|
|
|
sudo systemctl enable man-db.timer
|
|
|
|
|
|
|
|
caddy-install:
|
|
|
|
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
2024-06-24 21:42:28 +02:00
|
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
|
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
|
2024-06-23 15:10:36 +02:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install caddy
|
|
|
|
|
|
|
|
archivebox-mnt-nfs:
|
|
|
|
sudo mkdir -p {{archivebox_data}}
|
2024-06-24 21:42:28 +02:00
|
|
|
if ! df -h | grep "archivebox"; then sudo chown -R {{run_user}}:{{run_user}} {{archivebox_data}}; fi
|
|
|
|
if ! grep "archivebox" /etc/fstab; then echo "{{archivebox_nfs}} {{archivebox_data}} nfs4 soft,intr,rsize=8192,wsize=8192" | sudo tee -a /etc/fstab; fi
|
2024-06-23 15:10:36 +02:00
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo mount -av
|
|
|
|
|
|
|
|
archivebox-install:
|
|
|
|
sudo apt install -y pipx python3-dev python3-pip nodejs npm curl wget git ripgrep
|
|
|
|
pipx install archivebox
|
|
|
|
pipx install yt-dlp
|
|
|
|
pipx install playwright
|
|
|
|
playwright install --with-deps chromium
|
|
|
|
|
|
|
|
archivebox-init:
|
|
|
|
cd {{archivebox_data}} && archivebox init --setup
|
|
|
|
|
|
|
|
archivebox-setup:
|
|
|
|
cd {{archivebox_data}} && archivebox setup
|
|
|
|
|
|
|
|
mastodon-aux-setup:
|
2024-06-24 23:41:22 +02:00
|
|
|
sudo cp -v "${PWD}/bin/mastodon-to-minio" /usr/local/bin/
|
|
|
|
sudo chmod +x /usr/local/bin/mastodon-to-minio
|
|
|
|
sudo cp -v "${PWD}/systemd/system/mastodon-to-minio.service" /etc/systemd/system/
|
|
|
|
sudo cp -v "${PWD}/systemd/system/mastodon-to-minio.timer" /etc/systemd/system/
|
|
|
|
sudo systemctl enable --now mastodon-to-minio.timer
|
2024-06-23 15:10:36 +02:00
|
|
|
|
|
|
|
thelounge-install:
|
2024-06-24 21:42:28 +02:00
|
|
|
curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -qi -
|
2024-06-23 15:10:36 +02:00
|
|
|
sudo apt install -y ./thelounge*.deb
|
|
|
|
|
|
|
|
tailscale-install:
|
2024-06-24 21:42:28 +02:00
|
|
|
curl -fsSL https://tailscale.com/install.sh | sh
|
2024-06-23 15:10:36 +02:00
|
|
|
sudo tailscale up
|
|
|
|
|
|
|
|
qbt-install:
|
2024-06-24 21:42:28 +02:00
|
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/qbittorrent-cli/qbittorrent-cli/gpg.F8756541ADDA2B7D.key' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/qbittorrent-cli.gpg
|
|
|
|
sudo wget https://repos.fedorovich.com/debian/{{release}}/qbittorrent-cli.list -O /etc/apt/sources.list.d/qbittorrent-cli.list
|
2024-06-23 15:10:36 +02:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y qbittorrent-cli
|
|
|
|
|
|
|
|
qbittorrent-install:
|
|
|
|
sudo apt install -y qbittorrent-nox wireguard-tools lynx parallel wget curl httpie
|
|
|
|
|
|
|
|
qbittorrent-enable:
|
|
|
|
sudo systemctl enable --now qbittorrent-nox@{{run_user}}.service
|
|
|
|
|
|
|
|
scihub-setup:
|
|
|
|
mkdir ~/scihub-torrent-urls
|
2024-06-24 21:42:28 +02:00
|
|
|
lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ | grep "\.torrent" | tee scihub-torrent-urls/urls.txt
|
2024-06-23 15:10:36 +02:00
|
|
|
cd scihub-torrent-urls && split -l 60 urls.txt torrent-
|
|
|
|
rm -fv scihub-torrent-urls/urls.txt
|