From e38940da43801c22f7ece69a3a00aae709610327 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 23 Jan 2022 20:22:29 +0100 Subject: add almanac / ical feed syncing --- home/home.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'home/home.nix') diff --git a/home/home.nix b/home/home.nix index f2a0f7e..57aa9b2 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, ... }: +{ config, lib, pkgs, inputs, ... }: { # Let Home Manager install and manage itself. @@ -86,6 +86,7 @@ ll = "exa -lh --grid --icons"; llt = "exa -lh --tree --icons"; lt = "exa --tree --icons"; + agenda = "almanac month ~/.cache/feedsync/*"; }; functions = { fish_greeting = { @@ -94,9 +95,24 @@ }; }; + systemd.user.services.syncical = let + feeds = (import inputs.feeds).ical; in { + Unit.Description = "syncs ical feeds for almanac agenda"; + Service.ExecStart = "${./scripts/sync.scm} ${lib.fold (a: b: a + " " + b) "" feeds}"; + }; + + systemd.user.timers.syncical = { + Unit.Description = "automatically fetch new calendars"; + Timer = { + OnCalendar = "hourly"; + Unit = "syncical.service"; + }; + Install.WantedBy = [ "timers.target" ]; + }; + programs.newsboat = { enable = true; - urls = (import ./newsboat-public.nix) ++ (import inputs.feeds); + urls = (import ./newsboat-public.nix) ++ (import inputs.feeds).rss; browser = pkgs.lynx.outPath + "/bin/lynx"; reloadThreads = 100; queries = { -- cgit v1.2.3