From 709d70a4d95ddcb8ff8d5dce7ddc68f1628f88d6 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 28 Jul 2025 19:49:29 +0000 Subject: [PATCH] gpodder: configure settings (e.g. yt-dlp enablement) statically --- hosts/common/programs/gpodder/default.nix | 12 +- hosts/common/programs/gpodder/settings.nix | 140 +++++++++++++++++++++ 2 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 hosts/common/programs/gpodder/settings.nix diff --git a/hosts/common/programs/gpodder/default.nix b/hosts/common/programs/gpodder/default.nix index a2ddae308..50160fc93 100644 --- a/hosts/common/programs/gpodder/default.nix +++ b/hosts/common/programs/gpodder/default.nix @@ -35,6 +35,11 @@ in { sandbox.net = "clearnet"; fs.".config/gpodderFeeds.opml".symlink.text = feeds.feedsToOpml wanted-feeds; + fs.".local/share/gPodder/Settings.json".symlink.text = builtins.toJSON ./settings.nix; + # if you don't persist its database, you get untracked (and hence non-gc'd) downloads, plus slooow startup. + # but i *don't* want to persist all the things in this directory, so dedicate a subdir to the persisted data. + fs.".local/share/gPodder/Database".symlink.text = "persist/Database"; + # fs.".local/share/gPodder/gpodder.net".symlink.text = "persist/gpodder.net"; #< for synching episode playback positions between devices, i think services.gpodder-ensure-feeds = { description = "synchronize static OPML feeds into gPodder's subscription database"; @@ -44,8 +49,11 @@ in { persist.byStore.plaintext = [ "Videos/gPodder" - # if you don't persist its database, you get untracked (and hence non-gc'd) downloads, plus slooow startup. - ".local/share/gPodder" + ".local/share/gPodder/persist" + ]; + persist.byStore.ephemeral = [ + ".local/share/gPodder/Logs" + ".local/share/gPodder/youtube-dl" ]; }; } diff --git a/hosts/common/programs/gpodder/settings.nix b/hosts/common/programs/gpodder/settings.nix new file mode 100644 index 000000000..75d39abe9 --- /dev/null +++ b/hosts/common/programs/gpodder/settings.nix @@ -0,0 +1,140 @@ +{ + auto = { + cleanup.days = 7; + cleanup.played = false; + cleanup.unfinished = true; + cleanup.unplayed = false; + retries = 3; + update.enabled = false; + # update.frequency = 20; + }; + check_connection = false; + downloads.chronological_order = true; + extensions.enabled = [ + # gpodder's python-only youtube-dl module doesn't support DRM'd videos, + # so *always* shell out to yt-dlp + "youtube-dl" + ]; + extensions.youtube-dl = { + embed_subtitles = false; + manage_channel = true; + manage_downloads = true; + }; + limit.bandwidth.enabled = false; + # limit.bandwidth.kbps = 500.0; + limit.downloads.concurrent = 2; + limit.downloads.concurrent_max = 16; + limit.downloads.enabled = true; + limit.episodes = 200; + # player.audio = "default"; + # player.video = "default"; + software_update.check_on_startup = false; + software_update.interval = 0; + software_update.last_check = 0; + # "ui": { + # "cli": { + # "colors": true + # }, + # "gtk": { + # "color_scheme": "light", + # "download_list": { + # "remove_finished": true + # }, + # "episode_list": { + # "always_show_new": true, + # "columns": 6, + # "ctrl_click_to_sort": false, + # "descriptions": true, + # "right_align_released_column": false, + # "show_released_time": false, + # "trim_title_prefix": true, + # "view_mode": 1 + # }, + # "find_as_you_type": true, + # "html_shownotes": true, + # "live_search_delay": 200, + # "new_episodes": "show", + # "only_added_are_new": false, + # "podcast_list": { + # "all_episodes": true, + # "hide_empty": false, + # "sections": true, + # "view_mode": 1 + # }, + # "search_always_visible": false, + # "state": { + # "channel_editor": { + # "height": -1, + # "maximized": false, + # "width": -1, + # "x": -1, + # "y": -1 + # }, + # "config_editor": { + # "height": 450, + # "maximized": false, + # "width": 750, + # "x": 0, + # "y": 0 + # }, + # "episode_selector": { + # "height": 1136, + # "maximized": false, + # "width": 958, + # "x": 20, + # "y": 20 + # }, + # "episode_window": { + # "height": 400, + # "maximized": false, + # "width": 500, + # "x": -1, + # "y": -1 + # }, + # "export_to_local_folder": { + # "height": 400, + # "maximized": false, + # "width": 500, + # "x": -1, + # "y": -1 + # }, + # "main_window": { + # "episode_column_order": [], + # "episode_column_sort_id": 12, + # "episode_column_sort_order": false, + # "episode_list_size": 200, + # "height": 1137, + # "maximized": false, + # "paned_position": 200, + # "width": 1920, + # "x": 20, + # "y": 20 + # }, + # "podcastdirectory": { + # "height": -1, + # "maximized": false, + # "width": -1, + # "x": -1, + # "y": -1 + # }, + # "preferences": { + # "height": 1137, + # "maximized": false, + # "width": 1920, + # "x": 0, + # "y": 0 + # } + # }, + # "toolbar": false + # } + # }, + # "vimeo": { + # "fileformat": "720p" + # }, + # "youtube": { + # "preferred_fmt_id": 18, + # "preferred_fmt_ids": [], + # "preferred_hls_fmt_id": 93, + # "preferred_hls_fmt_ids": [] + # } +}