diff --git a/modules/universal/env/default.nix b/modules/universal/env/default.nix
index 59e4c9a5..7956d38d 100644
--- a/modules/universal/env/default.nix
+++ b/modules/universal/env/default.nix
@@ -2,6 +2,7 @@
{
imports = [
+ ./feeds.nix
./home-manager.nix
./home-packages.nix
./system-packages.nix
diff --git a/modules/universal/env/feeds.nix b/modules/universal/env/feeds.nix
new file mode 100644
index 00000000..c4d2fe96
--- /dev/null
+++ b/modules/universal/env/feeds.nix
@@ -0,0 +1,35 @@
+{ lib, ... }:
+
+with lib;
+{
+ options = {
+ 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"
+ ## 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"
+ ];
+ };
+ };
+}
diff --git a/modules/universal/env/home-manager.nix b/modules/universal/env/home-manager.nix
index 89657c9f..380eb92a 100644
--- a/modules/universal/env/home-manager.nix
+++ b/modules/universal/env/home-manager.nix
@@ -154,39 +154,28 @@ in
xdg.configFile."vlc/vlcrc".text =
let
- podcast_urls = lib.strings.concatStringsSep "|" [
- "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"
- ## 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"
- ];
+ podcastUrls = lib.strings.concatStringsSep "|" sysconfig.sane.feeds.podcastUrls;
in ''
[podcast]
- podcast-urls=${podcast_urls}
+ podcast-urls=${podcastUrls}
[core]
metadata-network-access=0
[qt]
qt-privacy-ask=0
'';
+ xdg.configFile."gpodderFeeds.opml".text =
+ let
+ entries = builtins.toString (builtins.map
+ (url: ''\n '')
+ sysconfig.sane.feeds.podcastUrls
+ );
+ in ''
+
+
+ ${entries}
+
+
+ '';
# gnome feeds RSS viewer
xdg.configFile."org.gabmus.gfeeds.json".text = builtins.toJSON {
diff --git a/modules/universal/env/home-packages.nix b/modules/universal/env/home-packages.nix
index a06b66cd..80c77325 100644
--- a/modules/universal/env/home-packages.nix
+++ b/modules/universal/env/home-packages.nix
@@ -67,7 +67,7 @@ let
gnome-podcasts
gnome.gnome-system-monitor
gnome.gnome-terminal # works on phosh
- gpodder
+ gpodder-configured
gthumb
inkscape
krita
diff --git a/pkgs/gpodder-configured/default.nix b/pkgs/gpodder-configured/default.nix
new file mode 100644
index 00000000..efab4719
--- /dev/null
+++ b/pkgs/gpodder-configured/default.nix
@@ -0,0 +1,24 @@
+{ pkgs
+, writeShellScript
+, config
+}:
+
+(pkgs.symlinkJoin {
+ name = "gpodder-configured";
+ paths = [ pkgs.gpodder ];
+ buildInputs = [ pkgs.makeWrapper ];
+
+ # gpodder keeps all its feeds in a sqlite3 database.
+ # we can configure the feeds externally by wrapping gpodder and just instructing it to import
+ # a feedlist every time we run it.
+ # repeat imports are deduplicated -- assuming network access (not sure how it behaves when disconnected).
+ postBuild = ''
+ makeWrapper $out/bin/gpodder $out/bin/gpodder-configured \
+ --run "$out/bin/gpo import ~/.config/gpodderFeeds.opml"
+
+ # fix up the .desktop file to invoke our wrapped application
+ orig_desktop=$(readlink $out/share/applications/gpodder.desktop)
+ unlink $out/share/applications/gpodder.desktop
+ sed "s:Exec=.*:Exec=$out/bin/gpodder-configured:" $orig_desktop > $out/share/applications/gpodder.desktop
+ '';
+})
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
index 7cd9781d..4765ce4a 100644
--- a/pkgs/overlay.nix
+++ b/pkgs/overlay.nix
@@ -22,6 +22,7 @@
#### customized packages
fluffychat-moby = prev.callPackage ./fluffychat-moby { pkgs = prev; };
+ gpodder-configured = prev.callPackage ./gpodder-configured { pkgs = prev; };
# nixos-unstable pleroma is too far out-of-date for our db
pleroma = prev.callPackage ./pleroma { };
# jackett doesn't allow customization of the bind address: this will probably always be here.