mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
start on rss feeds in mu4e
This commit is contained in:
parent
3cc349bcbf
commit
9ca9189554
2 changed files with 46 additions and 0 deletions
|
@ -39,6 +39,7 @@ rec {
|
||||||
VISUAL = emacsCommand;
|
VISUAL = emacsCommand;
|
||||||
ORGDIR = "${config.home.homeDirectory}/Documents/org";
|
ORGDIR = "${config.home.homeDirectory}/Documents/org";
|
||||||
UBCDIR = "${ORGDIR}/ubc";
|
UBCDIR = "${ORGDIR}/ubc";
|
||||||
|
MAILDIR = "${config.home.homeDirectory}/Maildir";
|
||||||
};
|
};
|
||||||
stateVersion = "22.11";
|
stateVersion = "22.11";
|
||||||
username = "willem";
|
username = "willem";
|
||||||
|
@ -47,6 +48,7 @@ rec {
|
||||||
imports = [
|
imports = [
|
||||||
./accounts.nix
|
./accounts.nix
|
||||||
./darwin.nix
|
./darwin.nix
|
||||||
|
./feeds.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./programs.nix
|
./programs.nix
|
||||||
];
|
];
|
||||||
|
|
44
home/feeds.nix
Normal file
44
home/feeds.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
feeds = {
|
||||||
|
xkcd = "http://xkcd.com/atom.xml";
|
||||||
|
dailywtf = "http://syndication.thedailywtf.com/TheDailyWtf";
|
||||||
|
nixos = "https://weekly.nixos.org/feeds/all.rss.xml";
|
||||||
|
rust = "https://blog.rust-lang.org/feed.xml";
|
||||||
|
insiderust = "https://blog.rust-lang.org/inside-rust/feed.xml";
|
||||||
|
kdb424 = "https://blog.kdb424.xyz/atom.xml";
|
||||||
|
devto = "https://dev.to/feed/";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
html-mail = "True";
|
||||||
|
date-header = "True";
|
||||||
|
from = "rss2email@home.localhost";
|
||||||
|
force-from = "False";
|
||||||
|
use-publisher-email = "True";
|
||||||
|
active = "true";
|
||||||
|
to = "willem@home.localhost";
|
||||||
|
email-protocol = "maildir";
|
||||||
|
maildir-mailbox = "feeds";
|
||||||
|
maildir-path = config.home.sessionVariables.MAILDIR;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkFeedString = name: url: ''
|
||||||
|
[feed.${name}]
|
||||||
|
url = ${url}
|
||||||
|
'';
|
||||||
|
|
||||||
|
configStrings = lib.mapAttrsToList (name: value: "${name} = ${value}\n") config;
|
||||||
|
|
||||||
|
feedStrings = lib.mapAttrsToList mkFeedString feeds;
|
||||||
|
|
||||||
|
configArray = [ "[DEFAULT]\n" ] ++ configStrings ++ feedStrings;
|
||||||
|
|
||||||
|
configString = lib.concatStrings configArray;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.rss2email ];
|
||||||
|
|
||||||
|
home.file.".config/rss2email.cfg".text = configString;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue