feeds: convert to ordinary nix expression instead of config/options
there's no real reason for it to be externally configurable at this level.
This commit is contained in:
1
modules/universal/env/default.nix
vendored
1
modules/universal/env/default.nix
vendored
@@ -2,7 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./feeds.nix
|
||||
./home-manager.nix
|
||||
./home-packages.nix
|
||||
./system-packages.nix
|
||||
|
228
modules/universal/env/feeds.nix
vendored
228
modules/universal/env/feeds.nix
vendored
@@ -1,131 +1,121 @@
|
||||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
# TODO: fold this into RSS, with an `audio` category
|
||||
sane.feeds.podcastUrls = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [
|
||||
"https://lexfridman.com/feed/podcast/"
|
||||
## Astral Codex Ten
|
||||
"http://feeds.libsyn.com/108018/rss"
|
||||
## Econ Talk
|
||||
"https://feeds.simplecast.com/wgl4xEgL"
|
||||
## Cory Doctorow
|
||||
"https://feeds.feedburner.com/doctorow_podcast"
|
||||
"https://congressionaldish.libsyn.com/rss"
|
||||
## Civboot
|
||||
"https://anchor.fm/s/34c7232c/podcast/rss"
|
||||
"https://feeds.feedburner.com/80000HoursPodcast"
|
||||
"https://allinchamathjason.libsyn.com/rss"
|
||||
"https://acquired.libsyn.com/rss"
|
||||
"https://rss.acast.com/deconstructed"
|
||||
## The Daily
|
||||
"https://feeds.simplecast.com/54nAGcIl"
|
||||
"https://rss.acast.com/intercepted-with-jeremy-scahill"
|
||||
"https://podcast.posttv.com/itunes/post-reports.xml"
|
||||
## Eric Weinstein
|
||||
"https://rss.art19.com/the-portal"
|
||||
"https://feeds.megaphone.fm/darknetdiaries"
|
||||
"http://feeds.wnyc.org/radiolab"
|
||||
"https://wakingup.libsyn.com/rss"
|
||||
## 99% Invisible
|
||||
"https://feeds.simplecast.com/BqbsxVfO"
|
||||
"https://rss.acast.com/ft-tech-tonic"
|
||||
"https://feeds.feedburner.com/dancarlin/history?format=xml"
|
||||
## 60 minutes (NB: this features more than *just* audio?)
|
||||
"https://www.cbsnews.com/latest/rss/60-minutes"
|
||||
];
|
||||
};
|
||||
# TODO: fold this into RSS, with an `audio` category
|
||||
podcastUrls = [
|
||||
"https://lexfridman.com/feed/podcast/"
|
||||
## Astral Codex Ten
|
||||
"http://feeds.libsyn.com/108018/rss"
|
||||
## Econ Talk
|
||||
"https://feeds.simplecast.com/wgl4xEgL"
|
||||
## Cory Doctorow
|
||||
"https://feeds.feedburner.com/doctorow_podcast"
|
||||
"https://congressionaldish.libsyn.com/rss"
|
||||
## Civboot
|
||||
"https://anchor.fm/s/34c7232c/podcast/rss"
|
||||
"https://feeds.feedburner.com/80000HoursPodcast"
|
||||
"https://allinchamathjason.libsyn.com/rss"
|
||||
"https://acquired.libsyn.com/rss"
|
||||
"https://rss.acast.com/deconstructed"
|
||||
## The Daily
|
||||
"https://feeds.simplecast.com/54nAGcIl"
|
||||
"https://rss.acast.com/intercepted-with-jeremy-scahill"
|
||||
"https://podcast.posttv.com/itunes/post-reports.xml"
|
||||
## Eric Weinstein
|
||||
"https://rss.art19.com/the-portal"
|
||||
"https://feeds.megaphone.fm/darknetdiaries"
|
||||
"http://feeds.wnyc.org/radiolab"
|
||||
"https://wakingup.libsyn.com/rss"
|
||||
## 99% Invisible
|
||||
"https://feeds.simplecast.com/BqbsxVfO"
|
||||
"https://rss.acast.com/ft-tech-tonic"
|
||||
"https://feeds.feedburner.com/dancarlin/history?format=xml"
|
||||
## 60 minutes (NB: this features more than *just* audio?)
|
||||
"https://www.cbsnews.com/latest/rss/60-minutes"
|
||||
];
|
||||
|
||||
sane.feeds.rss = mkOption {
|
||||
type = types.attrs;
|
||||
default = let
|
||||
hourly = { freq = "hourly"; };
|
||||
daily = { freq = "daily"; };
|
||||
weekly = { freq = "weekly"; };
|
||||
infrequent = { freq = "infrequent"; };
|
||||
rat = { cat = "rat"; };
|
||||
tech = { cat = "tech"; };
|
||||
pol = { cat = "pol"; };
|
||||
uncat = { cat = "uncat"; };
|
||||
visual = { cat = "visual"; };
|
||||
in {
|
||||
# AGGREGATORS (> 1 post/day)
|
||||
"https://www.lesswrong.com/feed.xml" = rat // hourly;
|
||||
"http://www.econlib.org/index.xml" = pol // hourly;
|
||||
rss =
|
||||
let
|
||||
hourly = { freq = "hourly"; };
|
||||
daily = { freq = "daily"; };
|
||||
weekly = { freq = "weekly"; };
|
||||
infrequent = { freq = "infrequent"; };
|
||||
rat = { cat = "rat"; };
|
||||
tech = { cat = "tech"; };
|
||||
pol = { cat = "pol"; };
|
||||
uncat = { cat = "uncat"; };
|
||||
visual = { cat = "visual"; };
|
||||
in {
|
||||
# AGGREGATORS (> 1 post/day)
|
||||
"https://www.lesswrong.com/feed.xml" = rat // hourly;
|
||||
"http://www.econlib.org/index.xml" = pol // hourly;
|
||||
|
||||
# AGGREGATORS (< 1 post/day)
|
||||
"https://palladiummag.com/feed" = uncat // weekly;
|
||||
"https://profectusmag.com/feed" = uncat // weekly;
|
||||
"https://semiaccurate.com/feed" = tech // weekly;
|
||||
"https://linuxphoneapps.org/blog/atom.xml" = tech // infrequent;
|
||||
"https://spectrum.ieee.org/rss" = tech // weekly;
|
||||
# AGGREGATORS (< 1 post/day)
|
||||
"https://palladiummag.com/feed" = uncat // weekly;
|
||||
"https://profectusmag.com/feed" = uncat // weekly;
|
||||
"https://semiaccurate.com/feed" = tech // weekly;
|
||||
"https://linuxphoneapps.org/blog/atom.xml" = tech // infrequent;
|
||||
"https://spectrum.ieee.org/rss" = tech // weekly;
|
||||
|
||||
## No Moods, Ads or Cutesy Fucking Icons
|
||||
"https://www.rifters.com/crawl/?feed=rss2" = uncat // weekly;
|
||||
## No Moods, Ads or Cutesy Fucking Icons
|
||||
"https://www.rifters.com/crawl/?feed=rss2" = uncat // weekly;
|
||||
|
||||
# DEVELOPERS
|
||||
"https://mg.lol/blog/rss/" = infrequent // tech;
|
||||
## Ken Shirriff
|
||||
"https://www.righto.com/feeds/posts/default" = tech // infrequent;
|
||||
## Vitalik Buterin
|
||||
"https://vitalik.ca/feed.xml" = tech // infrequent;
|
||||
## ian (Sanctuary)
|
||||
"https://sagacioussuricata.com/feed.xml" = tech // infrequent;
|
||||
## Bunnie Juang
|
||||
"https://www.bunniestudios.com/blog/?feed=rss2" = tech // infrequent;
|
||||
"https://blog.danieljanus.pl/atom.xml" = tech // infrequent;
|
||||
"https://ianthehenry.com/feed.xml" = tech // infrequent;
|
||||
"https://bitbashing.io/feed.xml" = tech // infrequent;
|
||||
"https://idiomdrottning.org/feed.xml" = uncat // daily;
|
||||
# DEVELOPERS
|
||||
"https://mg.lol/blog/rss/" = infrequent // tech;
|
||||
## Ken Shirriff
|
||||
"https://www.righto.com/feeds/posts/default" = tech // infrequent;
|
||||
## Vitalik Buterin
|
||||
"https://vitalik.ca/feed.xml" = tech // infrequent;
|
||||
## ian (Sanctuary)
|
||||
"https://sagacioussuricata.com/feed.xml" = tech // infrequent;
|
||||
## Bunnie Juang
|
||||
"https://www.bunniestudios.com/blog/?feed=rss2" = tech // infrequent;
|
||||
"https://blog.danieljanus.pl/atom.xml" = tech // infrequent;
|
||||
"https://ianthehenry.com/feed.xml" = tech // infrequent;
|
||||
"https://bitbashing.io/feed.xml" = tech // infrequent;
|
||||
"https://idiomdrottning.org/feed.xml" = uncat // daily;
|
||||
|
||||
# (TECH; POL) COMMENTATORS
|
||||
"http://benjaminrosshoffman.com/feed" = pol // weekly;
|
||||
## Ben Thompson
|
||||
"https://www.stratechery.com/rss" = pol // weekly;
|
||||
## Balaji
|
||||
"https://balajis.com/rss" = pol // weekly;
|
||||
"https://www.ben-evans.com/benedictevans/rss.xml" = pol // weekly;
|
||||
"https://www.lynalden.com/feed" = pol // infrequent;
|
||||
"https://austinvernon.site/rss.xml" = tech // infrequent;
|
||||
"https://oversharing.substack.com/feed" = pol // daily;
|
||||
"https://doomberg.substack.com/feed" = tech // weekly;
|
||||
## David Rosenthal
|
||||
"https://blog.dshr.org/rss.xml" = pol // weekly;
|
||||
## Matt Levine
|
||||
"https://www.bloomberg.com/opinion/authors/ARbTQlRLRjE/matthew-s-levine.rss" = pol // weekly;
|
||||
# (TECH; POL) COMMENTATORS
|
||||
"http://benjaminrosshoffman.com/feed" = pol // weekly;
|
||||
## Ben Thompson
|
||||
"https://www.stratechery.com/rss" = pol // weekly;
|
||||
## Balaji
|
||||
"https://balajis.com/rss" = pol // weekly;
|
||||
"https://www.ben-evans.com/benedictevans/rss.xml" = pol // weekly;
|
||||
"https://www.lynalden.com/feed" = pol // infrequent;
|
||||
"https://austinvernon.site/rss.xml" = tech // infrequent;
|
||||
"https://oversharing.substack.com/feed" = pol // daily;
|
||||
"https://doomberg.substack.com/feed" = tech // weekly;
|
||||
## David Rosenthal
|
||||
"https://blog.dshr.org/rss.xml" = pol // weekly;
|
||||
## Matt Levine
|
||||
"https://www.bloomberg.com/opinion/authors/ARbTQlRLRjE/matthew-s-levine.rss" = pol // weekly;
|
||||
|
||||
# RATIONALITY/PHILOSOPHY/ETC
|
||||
"https://samkriss.substack.com/feed" = uncat // infrequent; # ... satire? phil?
|
||||
"https://unintendedconsequenc.es/feed" = rat // infrequent;
|
||||
"https://applieddivinitystudies.com/atom.xml" = rat // weekly;
|
||||
"https://slimemoldtimemold.com/feed.xml" = rat // weekly;
|
||||
"https://www.richardcarrier.info/feed" = rat // weekly;
|
||||
"https://www.gwern.net/feed.xml" = uncat // infrequent;
|
||||
## Jason Crawford
|
||||
"https://rootsofprogress.org/feed.xml" = rat // weekly;
|
||||
## Robin Hanson
|
||||
"https://www.overcomingbias.com/feed" = rat // daily;
|
||||
## Scott Alexander
|
||||
"https://astralcodexten.substack.com/feed.xml" = rat // daily;
|
||||
## Paul Christiano
|
||||
"https://sideways-view.com/feed" = rat // infrequent;
|
||||
## Sean Carroll
|
||||
"https://www.preposterousuniverse.com/rss" = rat // infrequent;
|
||||
# RATIONALITY/PHILOSOPHY/ETC
|
||||
"https://samkriss.substack.com/feed" = uncat // infrequent; # ... satire? phil?
|
||||
"https://unintendedconsequenc.es/feed" = rat // infrequent;
|
||||
"https://applieddivinitystudies.com/atom.xml" = rat // weekly;
|
||||
"https://slimemoldtimemold.com/feed.xml" = rat // weekly;
|
||||
"https://www.richardcarrier.info/feed" = rat // weekly;
|
||||
"https://www.gwern.net/feed.xml" = uncat // infrequent;
|
||||
## Jason Crawford
|
||||
"https://rootsofprogress.org/feed.xml" = rat // weekly;
|
||||
## Robin Hanson
|
||||
"https://www.overcomingbias.com/feed" = rat // daily;
|
||||
## Scott Alexander
|
||||
"https://astralcodexten.substack.com/feed.xml" = rat // daily;
|
||||
## Paul Christiano
|
||||
"https://sideways-view.com/feed" = rat // infrequent;
|
||||
## Sean Carroll
|
||||
"https://www.preposterousuniverse.com/rss" = rat // infrequent;
|
||||
|
||||
# COMICS
|
||||
"https://www.smbc-comics.com/comic/rss" = visual // daily;
|
||||
"https://xkcd.com/atom.xml" = visual // daily;
|
||||
"http://dilbert.com/feed" = visual // daily;
|
||||
# COMICS
|
||||
"https://www.smbc-comics.com/comic/rss" = visual // daily;
|
||||
"https://xkcd.com/atom.xml" = visual // daily;
|
||||
"http://dilbert.com/feed" = visual // daily;
|
||||
|
||||
# ART
|
||||
"https://miniature-calendar.com/feed" = visual // daily;
|
||||
# ART
|
||||
"https://miniature-calendar.com/feed" = visual // daily;
|
||||
|
||||
# CODE
|
||||
"https://github.com/Kaiteki-Fedi/Kaiteki/commits/master.atom" = tech // infrequent;
|
||||
};
|
||||
};
|
||||
# CODE
|
||||
"https://github.com/Kaiteki-Fedi/Kaiteki/commits/master.atom" = tech // infrequent;
|
||||
};
|
||||
}
|
||||
|
9
modules/universal/env/home-manager.nix
vendored
9
modules/universal/env/home-manager.nix
vendored
@@ -17,6 +17,7 @@ let
|
||||
# extract `persist-files` from `extraPackages`
|
||||
persistfileslist = pkgspec: builtins.concatLists (builtins.map (e: if e ? "persist-files" then e.persist-files else []) pkgspec);
|
||||
# TODO: dirlist and persistfileslist should be folded
|
||||
feeds = import ./feeds.nix;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
@@ -205,7 +206,7 @@ in
|
||||
|
||||
xdg.configFile."vlc/vlcrc".text =
|
||||
let
|
||||
podcastUrls = lib.strings.concatStringsSep "|" sysconfig.sane.feeds.podcastUrls;
|
||||
podcastUrls = lib.strings.concatStringsSep "|" feeds.podcastUrls;
|
||||
in ''
|
||||
[podcast]
|
||||
podcast-urls=${podcastUrls}
|
||||
@@ -219,7 +220,7 @@ in
|
||||
let
|
||||
entries = builtins.toString (builtins.map
|
||||
(url: "\n " + ''<outline xmlUrl="${url}" type="rss"/>'')
|
||||
sysconfig.sane.feeds.podcastUrls
|
||||
feeds.podcastUrls
|
||||
);
|
||||
in ''
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
@@ -232,7 +233,7 @@ in
|
||||
# news-flash RSS viewer
|
||||
xdg.configFile."newsflashFeeds.opml".text =
|
||||
let
|
||||
entries = sysconfig.sane.feeds.rss;
|
||||
entries = feeds.rss;
|
||||
urlsForCat = cat: builtins.filter (rss: entries."${rss}".cat == cat) (builtins.attrNames entries);
|
||||
outlineEntriesFor = cat: builtins.map (rss: ''
|
||||
<outline type="rss" xmlUrl="${rss}" />
|
||||
@@ -266,7 +267,7 @@ in
|
||||
|
||||
# gnome feeds RSS viewer
|
||||
xdg.configFile."org.gabmus.gfeeds.json".text = builtins.toJSON {
|
||||
feeds = builtins.mapAttrs (r: p: { tags = [ p.cat p.freq ]; }) sysconfig.sane.feeds.rss;
|
||||
feeds = builtins.mapAttrs (r: p: { tags = [ p.cat p.freq ]; }) feeds.rss;
|
||||
dark_reader = false;
|
||||
new_first = true;
|
||||
# windowsize = {
|
||||
|
Reference in New Issue
Block a user