diff --git a/bin/.archived/armbian-tx-stats-html.nu b/.archived/armbian-tx-stats-html.nu similarity index 100% rename from bin/.archived/armbian-tx-stats-html.nu rename to .archived/armbian-tx-stats-html.nu diff --git a/bin/.archived/backup-to-minio.bash b/.archived/backup-to-minio.bash similarity index 100% rename from bin/.archived/backup-to-minio.bash rename to .archived/backup-to-minio.bash diff --git a/bin/.archived/qbt-sum-size.bash b/.archived/qbt-sum-size.bash similarity index 100% rename from bin/.archived/qbt-sum-size.bash rename to .archived/qbt-sum-size.bash diff --git a/bin/.archived/qbth.bash b/.archived/qbth.bash similarity index 100% rename from bin/.archived/qbth.bash rename to .archived/qbth.bash diff --git a/bin/.archived/qbtlist.bash b/.archived/qbtlist.bash similarity index 100% rename from bin/.archived/qbtlist.bash rename to .archived/qbtlist.bash diff --git a/bin/.archived/rsync-backup b/.archived/rsync-backup similarity index 100% rename from bin/.archived/rsync-backup rename to .archived/rsync-backup diff --git a/bin/.archived/seed-armbian-torrents.bash b/.archived/seed-armbian-torrents.bash similarity index 100% rename from bin/.archived/seed-armbian-torrents.bash rename to .archived/seed-armbian-torrents.bash diff --git a/bin/.archived/seed-armbian-tx.nu b/.archived/seed-armbian-tx.nu similarity index 100% rename from bin/.archived/seed-armbian-tx.nu rename to .archived/seed-armbian-tx.nu diff --git a/bin/.archived/server0_backup.sh b/.archived/server0_backup.sh similarity index 100% rename from bin/.archived/server0_backup.sh rename to .archived/server0_backup.sh diff --git a/bin/.archived/tx-stats-html.nu b/.archived/tx-stats-html.nu similarity index 100% rename from bin/.archived/tx-stats-html.nu rename to .archived/tx-stats-html.nu diff --git a/bin/add_qbt_trackers.py b/add_qbt_trackers.py similarity index 100% rename from bin/add_qbt_trackers.py rename to add_qbt_trackers.py diff --git a/bin/add_scihub_torrents.py b/add_scihub_torrents.py similarity index 100% rename from bin/add_scihub_torrents.py rename to add_scihub_torrents.py diff --git a/bin/calculate_mirror_size.py b/calculate_mirror_size.py similarity index 100% rename from bin/calculate_mirror_size.py rename to calculate_mirror_size.py diff --git a/bin/fetch_combined_trackers_list.py b/fetch_combined_trackers_list.py similarity index 100% rename from bin/fetch_combined_trackers_list.py rename to fetch_combined_trackers_list.py diff --git a/bin/fetch_scihub_infohashes.py b/fetch_scihub_infohashes.py similarity index 100% rename from bin/fetch_scihub_infohashes.py rename to fetch_scihub_infohashes.py diff --git a/justfile b/justfile deleted file mode 100644 index 4636461..0000000 --- a/justfile +++ /dev/null @@ -1,137 +0,0 @@ -## Justfile (https://github.com/casey/justfile) -## -## Helps automate various homelab tasks. - -distro := `grep -G "\bID\b" /etc/os-release | awk -F= '{print $2}'` -release := `grep "VERSION_CODENAME" /etc/os-release | awk -F= '{print $2}'` -run_user := env_var("USER") - -default: common - -common: - sudo apt update -t {{release}}-backports - sudo apt dist-upgrade -y -t {{release}}-backports - sudo apt install -y -t {{release}}-backports \ - apt-file \ - apt-listchanges \ - apt-transport-https \ - apt-utils \ - atop \ - autoconf \ - automake \ - build-essential \ - byobu \ - cmake \ - curl \ - firewalld \ - git \ - htop \ - ifplugd \ - iotop \ - less \ - libpam-systemd \ - lynis \ - man-db \ - manpages \ - neovim \ - nfs-common \ - nmon \ - pipx \ - python3-dev \ - python3-pip \ - rclone \ - rsync \ - unattended-upgrades \ - wget \ - zsh - sudo systemctl enable man-db.timer - pipx install glances - pipx install gmcapsule - -copy: - find "${PWD}/bin" -maxdepth 1 -type f -exec sudo cp -fv {} /usr/local/bin \; - find "${PWD}/systemd/system" -maxdepth 1 -type f -exec sudo cp -fv {} /etc/systemd/system \; - mkdir -p "${HOME}/.config/systemd/user" - find "${PWD}/systemd/user" -maxdepth 1 -type f -exec cp -fv {} "${HOME}/.config/systemd/user" \; - -cleanup: - sudo find /usr/local/bin -type f -delete - for item in "$(ls "${PWD}/systemd/system")"; do sudo rm -fv "/etc/systemd/system/$item"; done - for item in "$(ls "${PWD}/systemd/user")"; do rm -fv "${HOME}/.config/systemd/user/$item"; done - -caddy-install: - sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl - 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 - sudo apt update - sudo apt install caddy - -thelounge-install: - 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 - - sudo apt install -y ./thelounge*.deb - rm -fv ./thelounge*.deb - -tailscale-install: - curl -fsSL https://tailscale.com/install.sh | sh - sudo tailscale up - -scihub-setup: - mkdir ~/scihub-torrent-urls - lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ | grep "\.torrent" | tee ~/scihub-torrent-urls/urls.txt - cd ~/scihub-torrent-urls && split -l 60 ~/scihub-torrent-urls/urls.txt torrent- - rm -fv ~/scihub-torrent-urls/urls.txt - -docker-install: - for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt remove $pkg; done - - sudo apt update - sudo apt install -y ca-certificates curl - sudo install -m 0755 -d /etc/apt/keyrings - sudo curl -fsSL https://download.docker.com/linux/{{distro}}/gpg -o /etc/apt/keyrings/docker.asc - sudo chmod a+r /etc/apt/keyrings/docker.asc - - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/{{distro}} {{release}} stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - sudo apt update - sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose docker-compose-plugin - sudo systemctl enable --now docker.service - sudo usermod -aG docker {{run_user}} - -rustup: - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - -rustup-root: - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sudo sh - -rust-tools: - . "${HOME}/.cargo/env" - cargo install cargo-binstall - for pkg in "arp-scan" "bandwhich" "bat" "diskonaut" "du-dust" "fblog" "fd" "hyperfine" "procs" "ripgrep" "skim"; do \ - cargo-binstall -y "$pkg"; \ - done - -rust-tools-root: - sudo /root/.cargo/bin/cargo install cargo-binstall - for pkg in "arp-scan" "bandwhich" "bat" "diskonaut" "du-dust" "fblog" "fd-find" "hyperfine" "procs" "ripgrep" "skim"; do \ - sudo /root/.cargo/bin/cargo-binstall -y "$pkg"; \ - done - echo 'source "${HOME}/.cargo/env"' | sudo tee -a /root/.bashrc - echo 'source "${HOME}/.cargo/env"' | sudo tee -a /root/.zshrc - -neovim: - sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - - mkdir -p "${HOME}/.config/nvim" - wget https://cdn.hyperreal.coffee/init.vim -O "${HOME}/.config/nvim/init.vim" - -neovim-root: - sudo sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - - sudo mkdir -p /root/.config/nvim - sudo wget https://cdn.hyperreal.coffee/init.vim -O /root/.config/nvim/init.vim - -zshrc: - sudo wget https://cdn.hyperreal.coffee/zshrc -O /etc/zsh/zshrc - touch "${HOME}/.zshrc" - sudo touch /root/.zshrc diff --git a/bin/qbt_sum_size.py b/qbt_sum_size.py similarity index 100% rename from bin/qbt_sum_size.py rename to qbt_sum_size.py diff --git a/bin/qbth.py b/qbth.py similarity index 100% rename from bin/qbth.py rename to qbth.py diff --git a/bin/record_mastodon_media_size.bash b/record_mastodon_media_size.bash similarity index 100% rename from bin/record_mastodon_media_size.bash rename to record_mastodon_media_size.bash diff --git a/bin/scihub_knapsack.py b/scihub_knapsack.py similarity index 100% rename from bin/scihub_knapsack.py rename to scihub_knapsack.py diff --git a/bin/seed_armbian_torrents.py b/seed_armbian_torrents.py similarity index 100% rename from bin/seed_armbian_torrents.py rename to seed_armbian_torrents.py diff --git a/bin/seed_scihub_max_seeders.py b/seed_scihub_max_seeders.py similarity index 100% rename from bin/seed_scihub_max_seeders.py rename to seed_scihub_max_seeders.py diff --git a/systemd/system/.archived/backup-to-minio.service b/systemd/system/.archived/backup-to-minio.service deleted file mode 100644 index d8a34ba..0000000 --- a/systemd/system/.archived/backup-to-minio.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=backup-to-minio -AssertFileIsExecutable=/usr/local/bin/backup-to-minio - -[Service] -Type=oneshot -User=root -Group=root -ExecStart=/usr/local/bin/backup-to-minio - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/.archived/backup-to-minio.timer b/systemd/system/.archived/backup-to-minio.timer deleted file mode 100644 index 4439425..0000000 --- a/systemd/system/.archived/backup-to-minio.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=backup-to-minio - -[Timer] -OnCalendar=weekly -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/systemd/system/.archived/mastodon-backup.service b/systemd/system/.archived/mastodon-backup.service deleted file mode 100644 index e21e62a..0000000 --- a/systemd/system/.archived/mastodon-backup.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=mastodon-backup -AssertFileIsExecutable=/home/mastodon/bin/mastodon-backup -Requires=mnt-mastodon.mount -After=mnt-mastodon.mount - -[Service] -Type=oneshot -User=mastodon -Group=mastodon -ExecStart=/home/mastodon/bin/mastodon-backup - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/.archived/mastodon-backup.timer b/systemd/system/.archived/mastodon-backup.timer deleted file mode 100644 index b99ccd1..0000000 --- a/systemd/system/.archived/mastodon-backup.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=mastodon-backup - -[Timer] -OnCalendar=Sun *-*-* 03:30:00 -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/systemd/system/.archived/mastodon-to-minio.service b/systemd/system/.archived/mastodon-to-minio.service deleted file mode 100644 index 2b277b6..0000000 --- a/systemd/system/.archived/mastodon-to-minio.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=mastodon-to-minio -Wants=postgresql.service -AssertFileIsExecutable=/usr/local/bin/mastodon-to-minio - -[Service] -Type=oneshot -User=mastodon -Group=mastodon -WorkingDirectory=/home/mastodon -ExecStart=/usr/local/bin/mastodon-to-minio - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/.archived/mastodon-to-minio.timer b/systemd/system/.archived/mastodon-to-minio.timer deleted file mode 100644 index 034eb9c..0000000 --- a/systemd/system/.archived/mastodon-to-minio.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=mastodon-to-minio - -[Timer] -OnCalendar=*-*-* 21:00:00 -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/systemd/system/.archived/mnt-backup.mount b/systemd/system/.archived/mnt-backup.mount deleted file mode 100644 index 30f819b..0000000 --- a/systemd/system/.archived/mnt-backup.mount +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=hyperreal.coffee NFS share from TrueNAS (10.0.0.81) -DefaultDependencies=no -Conflicts=umount.target -After=network-online.target remote-fs.target -Before=umount.target - -[Mount] -What=10.0.0.81:/mnt/coffeeNAS/hyperreal.coffee -Where=/mnt/backup -Type=nfs -Options=defaults - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/.archived/mnt-mastodon.mount b/systemd/system/.archived/mnt-mastodon.mount deleted file mode 100644 index 81d878a..0000000 --- a/systemd/system/.archived/mnt-mastodon.mount +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=mastodon-data NFS share from TrueNAS (10.0.0.81) -DefaultDependencies=no -Conflicts=umount.target -After=network-online.target remote-fs.target -Before=umount.target - -[Mount] -What=10.0.0.81:/mnt/coffeeNAS/mastodon-data -Where=/mnt/mastodon -Type=nfs -Options=defaults - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/.archived/server0-backup.service b/systemd/system/.archived/server0-backup.service deleted file mode 100644 index daf49d3..0000000 --- a/systemd/system/.archived/server0-backup.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=server0-backup -AssertFileIsExecutable=/usr/local/bin/server0_backup -Requires=network-online.target -After=network-online.target - -[Service] -Type=oneshot -User=root -Group=root -ExecStart=/usr/local/bin/server0_backup - -[Install] -WantedBy=multi-user.target diff --git a/systemd/system/.archived/server0-backup.timer b/systemd/system/.archived/server0-backup.timer deleted file mode 100644 index 6af33ca..0000000 --- a/systemd/system/.archived/server0-backup.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=server0-backup - -[Timer] -OnCalendar=*-*-* 23:30:00 -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/systemd/user/.archived/seed-armbian-tx.service b/systemd/user/.archived/seed-armbian-tx.service deleted file mode 100644 index 8e84990..0000000 --- a/systemd/user/.archived/seed-armbian-tx.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Run seed-armbian-tx.nu -After=network.target - -[Service] -Type=oneshot -ExecStart=nu /home/jas/bin/seed-armbian-tx.nu - -[Install] -WantedBy=default.target diff --git a/systemd/user/.archived/seed-armbian-tx.timer b/systemd/user/.archived/seed-armbian-tx.timer deleted file mode 100644 index bf1526c..0000000 --- a/systemd/user/.archived/seed-armbian-tx.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Run seed-armbian-tx.nu - -[Timer] -OnCalendar=weekly -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/systemd/user/.archived/transmission-trackers.service b/systemd/user/.archived/transmission-trackers.service deleted file mode 100644 index 842e5f4..0000000 --- a/systemd/user/.archived/transmission-trackers.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Add trackers to Transmission torrents -After=network.target network-online.target -Wants=network-online.target - -[Service] -Type=oneshot -WorkingDirectory=/home/jas/transmission-trackers -ExecStart=/home/jas/transmission-trackers/venv/bin/python transmission-trackers.py -SyslogIdentifier=transmission-trackers - -[Install] -WantedBy=default.target diff --git a/systemd/user/.archived/transmission-trackers.timer b/systemd/user/.archived/transmission-trackers.timer deleted file mode 100644 index 3bfd1a3..0000000 --- a/systemd/user/.archived/transmission-trackers.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Add trackers to Transmission torrents every 30 minutes - -[Timer] -OnBootSec=30s -OnUnitActiveSec=30min - -[Install] -WantedBy=timers.target diff --git a/systemd/user/.archived/tx-stats-html.service b/systemd/user/.archived/tx-stats-html.service deleted file mode 100644 index 94ad59f..0000000 --- a/systemd/user/.archived/tx-stats-html.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Run tx-stats-html.nu -After=network.target - -[Service] -Type=oneshot -ExecStart=nu /home/jas/bin/tx-stats-html.nu -SyslogIdentifier=tx-stats-html - -[Install] -WantedBy=default.target diff --git a/systemd/user/.archived/tx-stats-html.timer b/systemd/user/.archived/tx-stats-html.timer deleted file mode 100644 index b33b2d0..0000000 --- a/systemd/user/.archived/tx-stats-html.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Run torrentstats-html.nu - -[Timer] -OnCalendar=hourly -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/systemd/user/glances.service b/systemd/user/glances.service deleted file mode 100644 index 238f13e..0000000 --- a/systemd/user/glances.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Glances -After=network.target -AssertFileIsExecutable=/home/jas/.local/bin/glances - -[Service] -ExecStart=/home/jas/.local/bin/glances -s -Restart=always -RemainAfterExit=no - -[Install] -WantedBy=default.target diff --git a/systemd/user/gmcapsuled.service b/systemd/user/gmcapsuled.service deleted file mode 100644 index 39c8139..0000000 --- a/systemd/user/gmcapsuled.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=GmCapsule: extensible Gemini/Titan server -After=network.target - -[Service] -Type=simple -ExecStart=/home/jas/.local/bin/gmcapsuled -ExecReload=/bin/kill -HUP $MAINPID -Restart=always -Environment="PYTHONUNBUFFERED=1" -SyslogIdentifier=gmcapsule - -[Install] -WantedBy=default.target diff --git a/bin/update_tracker.py b/update_tracker.py similarity index 100% rename from bin/update_tracker.py rename to update_tracker.py