AnimMouse / NixOS-ISO-Torrents

NixOS ISO Torrents
Mozilla Public License 2.0
48 stars 1 forks source link

Feature Request: A script or rss feed for seeding #4

Open cablespaghetti opened 1 year ago

cablespaghetti commented 1 year ago

This is great! The single NixOS ISO download mirror is pretty slow, I got about 2-3MB/s today. If we can get a good number of people seeding these torrents then it stands to improve things for people with fast and slow internet alike.

Short of writing a multi-stage script to grab the releases atom feed and then grab the downloads for each release and then dump them in my "watched" torrent directory, I don't have a way to automatically grab and seed these. There are probably tools to grab RSS feeds and dump the torrents to a location so maybe providing one of those at a fixed location would be the easiest?

AnimMouse commented 1 year ago

A good idea, but I don't know about how to do torrent RSS feeds hosting today, and for potential seeders, they will just see this as a waste of their bandwidth because NixOS ISOs tend to be relatively short-lived, and the next day the NixOS ISO that they downloaded will become obsolete in an instant.

For a script that automatically grabs and download torrents, you can call GitHub API to get latest tag, then put it inside the variable, and insert that variable to the download link like this:

#!/bin/bash
version=$(curl -s https://api.github.com/repos/AnimMouse/NixOS-ISO-Torrents/releases/latest | jq -r '.tag_name')
wget https://github.com/AnimMouse/NixOS-ISO-Torrents/releases/download/$version/nixos-plasma5-${version/v}-x86_64-linux.iso.torrent
hyperreal64 commented 1 year ago

This is great! The single NixOS ISO download mirror is pretty slow, I got about 2-3MB/s today. If we can get a good number of people seeding these torrents then it stands to improve things for people with fast and slow internet alike.

Short of writing a multi-stage script to grab the releases atom feed and then grab the downloads for each release and then dump them in my "watched" torrent directory, I don't have a way to automatically grab and seed these. There are probably tools to grab RSS feeds and dump the torrents to a location so maybe providing one of those at a fixed location would be the easiest?

I have a torrent helper program written in Go that fetches torrents and adds them to a running Transmission daemon instance. Depending on your use case, you may want something simpler, but I just thought I'd share this here. NixOS is one of the distros it supports.

https://tildegit.org/hyperreal/go-torrent-helper