From 3690815630fa06dfbf05dd1f2376cb83ee47f2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sat, 17 May 2025 12:39:00 +0200 Subject: [PATCH] curacao: Regularly run rssVideos download --- curacao/default.nix | 1 + curacao/rssVideos.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 curacao/rssVideos.nix diff --git a/curacao/default.nix b/curacao/default.nix index 1e3655e..c78cafc 100644 --- a/curacao/default.nix +++ b/curacao/default.nix @@ -14,6 +14,7 @@ ./features.nix ./hardware.nix ./homeautomation + ./rssVideos.nix ./webcam ]; } diff --git a/curacao/rssVideos.nix b/curacao/rssVideos.nix new file mode 100644 index 0000000..bb4dd43 --- /dev/null +++ b/curacao/rssVideos.nix @@ -0,0 +1,31 @@ +{ ... }: +{ + config.home-manager.users.geoffrey = + { + pkgs, + lib, + config, + ... + }: + { + systemd.user = { + services.rss_videos_download = { + Service = { + Type = "oneshot"; + ExecStart = lib.getExe ( + pkgs.writeShellApplication { + name = "rss_videos_download"; + text = '' + ${config.home.homeDirectory}/.config/dotfiles/hm/scripts/rssVideos download + ''; + } + ); + }; + }; + timers.rss_videos_download = { + Timer.OnCalendar = "hourly"; + Install.WantedBy = [ "timers.target" ]; + }; + }; + }; +}