added rss downloader

This commit is contained in:
2026-08-01 12:03:22 +02:00
parent b230720ab5
commit af6e5b99cd
5 changed files with 34 additions and 4 deletions
+7 -1
View File
@@ -9,9 +9,14 @@
}; };
herdr.url = "github:ogulcancelik/herdr"; herdr.url = "github:ogulcancelik/herdr";
rssdownloader-src = {
url = "path:/home/ulve/code/rssdownloader";
flake = false;
};
}; };
outputs = {self, home-manager, nixpkgs, herdr, ...}: { outputs = {self, home-manager, nixpkgs, herdr, rssdownloader-src, ...}: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@@ -64,6 +69,7 @@
nixosConfigurations.nixserve = nixpkgs.lib.nixosSystem { nixosConfigurations.nixserve = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit rssdownloader-src; };
modules = [ modules = [
./hosts/nixserve ./hosts/nixserve
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
+1
View File
@@ -49,6 +49,7 @@
networking.firewall.allowedTCPPorts = [ 80 443 /* HTTP */ 111 2049 4000 4001 4002 20048 /* NFS */ 3923 /* copyparty */ ]; networking.firewall.allowedTCPPorts = [ 80 443 /* HTTP */ 111 2049 4000 4001 4002 20048 /* NFS */ 3923 /* copyparty */ ];
networking.firewall.allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 /* NFS */ ]; networking.firewall.allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 /* NFS */ ];
networking.firewall.trustedInterfaces = [ "tailscale0" ];
programs.zsh.enable = true; programs.zsh.enable = true;
security.polkit.enable = true; security.polkit.enable = true;
+1 -1
View File
@@ -8,7 +8,7 @@ let
bad() { echo -e " ''${R}''${N} $*"; } bad() { echo -e " ''${R}''${N} $*"; }
section(){ echo -e "\n''${W}''${B}$*''${N}"; } section(){ echo -e "\n''${W}''${B}$*''${N}"; }
echo -e "''${W}nixserve''${N} $(date '+%Y-%m-%d %H:%M') uptime: $(uptime -p | sed 's/up //') load: $(cut -d' ' -f1-3 /proc/loadavg)" echo -e "''${W}nixserve''${N} $(date '+%Y-%m-%d %H:%M') uptime: $(uptime | sed 's/.*up //; s/,.*//') load: $(cut -d' ' -f1-3 /proc/loadavg)"
# ZFS # ZFS
section "ZFS" section "ZFS"
+7
View File
@@ -0,0 +1,7 @@
{ pkgs, src }:
pkgs.buildGoModule {
pname = "rssdownloader";
version = "0.1.0";
inherit src;
vendorHash = null;
}
+18 -2
View File
@@ -1,6 +1,8 @@
{ pkgs, ... }: { pkgs, rssdownloader-src, ... }:
let let
rssdownloader = pkgs.callPackage ./rssdownloader.nix { src = rssdownloader-src; };
proxyVhost = { upstream, websockets ? true, maxBodySize ? "1g" }: { proxyVhost = { upstream, websockets ? true, maxBodySize ? "1g" }: {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
@@ -41,7 +43,8 @@ in
lockdPort = 4001; lockdPort = 4001;
mountdPort = 4002; mountdPort = 4002;
exports = '' exports = ''
/media 192.168.50.0/24(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=0) /media 192.168.50.0/24(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=0,insecure)
/media 100.64.0.0/10(rw,sync,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=0,insecure)
''; '';
}; };
@@ -107,6 +110,19 @@ in
}; };
}; };
systemd.services.rssdownloader = {
description = "RSS Torrent Downloader";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.transmission_4 ];
serviceConfig = {
Type = "simple";
ExecStart = "${rssdownloader}/bin/rssdownloader -config /home/ulve/code/rssdownloader/config.json";
Restart = "on-failure";
User = "ulve";
};
};
systemd.services.transmission = dockerService { systemd.services.transmission = dockerService {
name = "transmission"; name = "transmission";
description = "Transmission via Mullvad VPN"; description = "Transmission via Mullvad VPN";