diff options
author | stuebinm | 2022-01-23 20:22:29 +0100 |
---|---|---|
committer | stuebinm | 2022-01-24 00:05:38 +0100 |
commit | e38940da43801c22f7ece69a3a00aae709610327 (patch) | |
tree | 3b38d779923c7c50980bc1f3b0c37b39bfd3dbc4 /home/home.nix | |
parent | 5f532cabbfc02dcab366e5b83b261b386d128b96 (diff) |
add almanac / ical feed syncing
Diffstat (limited to '')
-rw-r--r-- | home/home.nix | 20 |
1 files changed, 18 insertions, 2 deletions
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 = { |