Simplify. Emphasis on the 'simp'.

This commit is contained in:
Jeffrey Serio 2024-06-24 14:42:28 -05:00
parent bd79726efe
commit 99c42f9247
3 changed files with 11 additions and 68 deletions

View File

@ -1,8 +0,0 @@
[server]
host = hyperreal.coffee
address = 0.0.0.0
port = 1965
certs = ~/.gemini-certs
[static]
root = ~/public/gemini

View File

@ -11,7 +11,7 @@
## - Tailscale ## - Tailscale
## - The Lounge IRC ## - The Lounge IRC
debian_codename := `grep "VERSION_CODENAME" /etc/os-release | awk -F= '{print $2}'` release := `grep "VERSION_CODENAME" /etc/os-release | awk -F= '{print $2}'`
run_user := env_var("USER") run_user := env_var("USER")
archivebox_data := "/nfs/archivebox" archivebox_data := "/nfs/archivebox"
archivebox_nfs := "10.0.0.6:/mnt/coffeeNAS/archivebox" archivebox_nfs := "10.0.0.6:/mnt/coffeeNAS/archivebox"
@ -49,40 +49,25 @@ common:
pipx \ pipx \
python3-dev \ python3-dev \
python3-pip \ python3-pip \
rclone \
rsync \ rsync \
unattended-upgrades \ unattended-upgrades \
vim \ vim \
wget \ wget \
zsh zsh
sudo systemctl unmask systemd-logind
sudo systemctl enable systemd-logind
sudo sed -i 's/INTERFACES=\"\"/INTERFACES=\"eth0\"' /etc/default/ifplugd
sudo systemctl enable ifplugd
sudo systemctl enable systemd-networkd
sudo systemctl enable man-db.timer sudo systemctl enable man-db.timer
sudo cp -v "${PWD}/systemd/network/eth0.network" /etc/systemd/network/
sudo chown root:root /etc/systemd/network/eth0.network
sudo usermod -s /usr/bin/zsh {{run_user}}
caddy-install: caddy-install:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
| 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
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
| sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update sudo apt update
sudo apt install caddy sudo apt install caddy
sudo rsync -aAXP "${PWD}/caddy/" /etc/caddy
archivebox-mnt-nfs: archivebox-mnt-nfs:
sudo mkdir -p {{archivebox_data}} sudo mkdir -p {{archivebox_data}}
if ! df -h | grep "archivebox"; then \ if ! df -h | grep "archivebox"; then sudo chown -R {{run_user}}:{{run_user}} {{archivebox_data}}; fi
sudo chown -R {{run_user}}:{{run_user}} {{archivebox_data}}; \ if ! grep "archivebox" /etc/fstab; then echo "{{archivebox_nfs}} {{archivebox_data}} nfs4 soft,intr,rsize=8192,wsize=8192" | sudo tee -a /etc/fstab; fi
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
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo mount -av sudo mount -av
@ -99,49 +84,22 @@ archivebox-init:
archivebox-setup: archivebox-setup:
cd {{archivebox_data}} && archivebox setup cd {{archivebox_data}} && archivebox setup
gmcapsuled-install:
pipx install gmcapsule
mkdir -p ~/.config/systemd/user
cp -v "${PWD}/systemd/user/gmcapsuled.service" ~/.config/systemd/user/
cp -v "${PWD}/gmcapsulerc" ~/.gmcapsulerc
mastodon-aux-setup: mastodon-aux-setup:
sudo apt install -y rclone sudo apt install -y rclone
sudo cp -v "${PWD}/systemd/system/mastodon"* /etc/systemd/system/
sudo cp -v "${PWD}/bin/mastodon-db-backup" /usr/local/bin
sudo chown -R root:root /usr/local/bin/mastodon-db-backup
sudo chmod 755 /usr/local/bin/mastodon-db-backup
sudo systemctl enable --now mastodon-db-backup.timer
sudo systemctl enable --now mastodon-to-minio.timer
thelounge-install: thelounge-install:
curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest \ 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 -
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
sudo apt install -y ./thelounge*.deb sudo apt install -y ./thelounge*.deb
tailscale-install: tailscale-install:
curl -fsSL https://pkgs.tailscale.com/stable/debian/{{debian_codename}}.noarmor.gpg \ curl -fsSL https://tailscale.com/install.sh | sh
| sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/{{debian_codename}}.tailscale-keyring.list \
| sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt update
sudo apt install -y tailscale
sudo systemctl enable --now tailscaled
sudo tailscale up sudo tailscale up
qbt-install: qbt-install:
curl -1sLf 'https://dl.cloudsmith.io/public/qbittorrent-cli/qbittorrent-cli/gpg.F8756541ADDA2B7D.key' \ 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 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
sudo wget https://repos.fedorovich.com/debian/{{ debian_codename }}/qbittorrent-cli.list \
-O /etc/apt/sources.list.d/qbittorrent-cli.list
sudo apt update sudo apt update
sudo apt install -y qbittorrent-cli sudo apt install -y qbittorrent-cli
mkdir ~/bin
cp -v "${PWD}/bin/qbth" ~/bin/
cp -v "${PWD}/bin/qbtlist" ~/bin/
qbittorrent-install: qbittorrent-install:
sudo apt install -y qbittorrent-nox wireguard-tools lynx parallel wget curl httpie sudo apt install -y qbittorrent-nox wireguard-tools lynx parallel wget curl httpie
@ -151,8 +109,6 @@ qbittorrent-enable:
scihub-setup: scihub-setup:
mkdir ~/scihub-torrent-urls mkdir ~/scihub-torrent-urls
lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ \ lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ | grep "\.torrent" | tee scihub-torrent-urls/urls.txt
| grep "\.torrent" \
| tee scihub-torrent-urls/urls.txt
cd scihub-torrent-urls && split -l 60 urls.txt torrent- cd scihub-torrent-urls && split -l 60 urls.txt torrent-
rm -fv scihub-torrent-urls/urls.txt rm -fv scihub-torrent-urls/urls.txt

View File

@ -1,5 +0,0 @@
[Match]
Name=eth0
[Network]
DHCP=yes