diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index 7a0bca5..d77f142 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -28,6 +28,7 @@ ./media-tdarr.nix ./media-jellyfin.nix ./media-youtube.nix + ./media-castget.nix # logging ./loki.nix diff --git a/nixos/machines/chungus/media-castget.nix b/nixos/machines/chungus/media-castget.nix new file mode 100644 index 0000000..1e0ed5f --- /dev/null +++ b/nixos/machines/chungus/media-castget.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: +let + home = "/media/podcasts"; +in +{ + custom.services.castget = { + enable = true; + user = "media"; + feeds = { + Alternativlos = { + url = "https://alternativlos.org/alternativlos.rss"; + spool = "${home}/Alternativlos"; + }; + WohlstandFuerAlle = { + url = "https://wohlstandfueralle.podigee.io/feed/mp3"; + spool = "${home}/Wohlstand für Alle"; + }; + DieNeuenZwanziger = { + url = "https://neuezwanziger.de/feed/mp3/"; + spool = "${home}/Die Neuen Zwanziger"; + }; + }; + }; +} diff --git a/nixos/machines/chungus/media-youtube.nix b/nixos/machines/chungus/media-youtube.nix index c01b021..b5a96e2 100644 --- a/nixos/machines/chungus/media-youtube.nix +++ b/nixos/machines/chungus/media-youtube.nix @@ -92,6 +92,22 @@ let target = "/media/youtube/series/SunkCostGalaxy"; output = "SunkCostGalaxy S01E%(playlist_index)s %(title)s.%(ext)s"; }; + MusicVideos = { + url = "https://www.youtube.com/playlist?list=PLP33x-q_GftakJgpD48pZNl0TkhljQI7S"; + target = "/media/youtube/music-videos"; + output = "%(title)s.%(ext)s"; + }; + Movies = { + url = "https://www.youtube.com/playlist?list=PLP33x-q_Gftb-r8eUWBS1mjMlQZgCAljE"; + target = "/media/youtube/movies"; + output = "%(title)s.%(ext)s"; + }; + # like Documentations or something + Videos = { + url = "https://www.youtube.com/playlist?list=PLP33x-q_GftZa0-UG9yltYLea5scEHxd7"; + target = "/media/youtube/loot"; + output = "%(title)s.%(ext)s"; + }; }; downloadScript = diff --git a/nixos/machines/robi/castget.nix b/nixos/machines/robi/castget.nix deleted file mode 100644 index 0742dad..0000000 --- a/nixos/machines/robi/castget.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, ... }: -let - - home = "/home/syncthing/podcasts"; - -in -{ - custom.services.castget = { - enable = true; - user = "root"; - feeds = { - Alternativlos = { - url = "https://alternativlos.org/alternativlos.rss"; - spool = "${home}/alternativlos"; - }; - gegenstandpunkt = { - url = "https://pc.argudiss.de/"; - spool = "${home}/GegenStandpunkt"; - }; - }; - }; -} diff --git a/nixos/modules/services/castget.nix b/nixos/modules/services/castget.nix index 20ebcfe..fbe67ed 100644 --- a/nixos/modules/services/castget.nix +++ b/nixos/modules/services/castget.nix @@ -1,46 +1,42 @@ { config, lib, pkgs, ... }: - with lib; - +with types; let - cfg = config.custom.services.castget; - in { options.custom.services.castget = { enable = mkEnableOption "enable custom.services.castget"; feeds = mkOption { - type = with types; - attrsOf (submodule { - options = { - url = mkOption { - type = with types; str; - description = '' - url to the rss feed - ''; - }; - spool = mkOption { - type = with types; path; - description = '' - download enclosures to this directory. - ''; - }; + type = attrsOf (submodule { + options = { + url = mkOption { + type = str; + description = '' + url to the rss feed + ''; }; - }); + spool = mkOption { + type = path; + description = '' + download enclosures to this directory. + ''; + }; + }; + }); description = '' configurations for the cast ''; }; user = mkOption { - type = with types; string; + type = str; description = '' user to run the systemd service as ''; }; timerConfig = mkOption { - type = with types; attrsOf str; + type = attrsOf str; default = { OnCalendar = "daily"; }; example = { OnCalendar = "00:05"; @@ -51,7 +47,7 @@ in ''; }; serviceName = mkOption { - type = with types; string; + type = str; default = "castget"; description = '' the name of the castget systemd service @@ -70,8 +66,7 @@ in preStart = let - mkSpools = - mapAttrsToList (ignore: value: "mkdir -p ${value.spool}") cfg.feeds; + mkSpools = mapAttrsToList (ignore: value: "mkdir -p \"${value.spool}\"") cfg.feeds; in concatStringsSep "\n" mkSpools; script =