From c3e240d2e3ad7c7877f95919a59f333bf96f6ba0 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 22 Mar 2025 13:30:29 +0000 Subject: [PATCH] Manage newsboat with Home Manager --- nix/home/opdavies/hosts/t480.nix | 1 + nix/hosts/t480/configuration.nix | 1 - nix/hosts/t490/configuration.nix | 1 - nix/modules/home-manager/cli/default.nix | 1 + nix/modules/home-manager/cli/newsboat.nix | 335 ++++++++++++++++++++++ 5 files changed, 337 insertions(+), 2 deletions(-) create mode 100644 nix/modules/home-manager/cli/newsboat.nix diff --git a/nix/home/opdavies/hosts/t480.nix b/nix/home/opdavies/hosts/t480.nix index 2447eb4d..d138be73 100644 --- a/nix/home/opdavies/hosts/t480.nix +++ b/nix/home/opdavies/hosts/t480.nix @@ -15,6 +15,7 @@ kdenlive.enable = true; mpv.enable = true; neovim.enable = true; + newsboat.enable = true; notes = { enable = true; diff --git a/nix/hosts/t480/configuration.nix b/nix/hosts/t480/configuration.nix index d2d2b0c7..be333157 100644 --- a/nix/hosts/t480/configuration.nix +++ b/nix/hosts/t480/configuration.nix @@ -52,7 +52,6 @@ environment.systemPackages = with pkgs; [ gtypist - newsboat pam_gnupg rclone rclone-browser diff --git a/nix/hosts/t490/configuration.nix b/nix/hosts/t490/configuration.nix index d2d2b0c7..be333157 100644 --- a/nix/hosts/t490/configuration.nix +++ b/nix/hosts/t490/configuration.nix @@ -52,7 +52,6 @@ environment.systemPackages = with pkgs; [ gtypist - newsboat pam_gnupg rclone rclone-browser diff --git a/nix/modules/home-manager/cli/default.nix b/nix/modules/home-manager/cli/default.nix index badabd99..2becbafc 100644 --- a/nix/modules/home-manager/cli/default.nix +++ b/nix/modules/home-manager/cli/default.nix @@ -8,6 +8,7 @@ ./fzf.nix ./git.nix ./neovim.nix + ./newsboat.nix ./notes.nix ./phpactor.nix ./starship.nix diff --git a/nix/modules/home-manager/cli/newsboat.nix b/nix/modules/home-manager/cli/newsboat.nix new file mode 100644 index 00000000..bbbd1e33 --- /dev/null +++ b/nix/modules/home-manager/cli/newsboat.nix @@ -0,0 +1,335 @@ +{ + config, + lib, + ... +}: + +with lib; + +{ + options.homeManagerModules.newsboat.enable = mkEnableOption "Enable newsboat"; + + config = mkIf config.homeManagerModules.newsboat.enable { + programs.newsboat = { + enable = true; + + extraConfig = '' + bind-key j down + bind-key k up + + bind-key j next articlelist + bind-key k prev articlelist + bind-key J next-feed articlelist + bind-key K prev-feed articlelist + + bind-key g home + bind-key G end + + bind-key d pagedown + bind-key u pageup + + bind-key a toggle-article-read + bind-key n next-unread + bind-key N prev-unread + bind-key x pb-delete + + color info white black bold + ''; + + urls = [ + { url = "https://www.reddit.com/r/nginx/new/.rss"; } + { url = "https://www.reddit.com/r/devops/.rss"; } + { url = "https://medium.com/feed/@bdfinst"; } + { url = "https://blog.system76.com/rss"; } + { url = "https://medium.com/feed/@codemonkeymike"; } + { url = "https://www.reddit.com/r/devops/new/.rss"; } + { url = "https://www.reddit.com/r/sysadmin/.rss"; } + { + url = "https://www.carlpullein.com/blog?format=RSS"; + title = "Carl Pullein"; + tags = [ "Productivity" ]; + } + { url = "https://feeds.feedburner.com/Faildesk"; } + { url = "https://syndication.thedailywtf.com/TheDailyWtf"; } + { url = "https://www.sherdog.com/rss/videos2.xml"; } + { + url = "https://www.reddit.com/r/MMA/.rss"; + tags = [ "MMA" ]; + } + { + url = "https://mmaweekly.com/feed/rss"; + tags = [ "MMA" ]; + } + { + url = "https://www.sherdog.com/rss/news2.xml"; + tags = [ "MMA" ]; + } + { + url = "https://www.sherdog.com/rss/articles2.xml"; + tags = [ "MMA" ]; + } + { + url = "https://www.ufc.com/rss/news"; + tags = [ "MMA" ]; + } + { url = "https://www.theregister.co.uk/headlines.atom"; } + { + url = "https://www.rbs6nations.com/en/RssLatestNews.xml"; + tags = [ "Rugby" ]; + } + { + url = "https://feeds.feedburner.com/rugbydump"; + tags = [ "Rugby" ]; + } + { + url = "https://www.telegraph.co.uk/sport/rugbyunion/rss"; + tags = [ "Rugby" ]; + } + { url = "https://code.facebook.com/posts/rss"; } + { url = "https://nginx.com/feed/rss"; } + { + url = "https://www.lornajane.net/feed"; + tags = [ "Software" ]; + } + { + url = "https://nginx.org/index.rss"; + tags = [ "Software" ]; + } + { url = "https://www.engadget.com/rss.xml"; } + { url = "https://rss.slashdot.org/Slashdot/slashdotIt"; } + { url = "https://lwn.net/headlines/newrss"; } + { url = "https://rss.slashdot.org/Slashdot/slashdotLinux"; } + { + url = "https://blog.sebastian-daschner.com/feeds/rss"; + title = "Sebastian Daschner"; + } + { url = "https://www.reddit.com/r/linux/.rss"; } + { url = "https://githubengineering.com/atom.xml"; } + { url = "https://rss.slashdot.org/Slashdot/slashdotDevelopers"; } + { url = "https://www.alistapart.com/rss.xml"; } + { url = "https://www.christitus.com/index.xml"; } + { url = "https://www.freeagentcentral.com/feed.rss"; } + { url = "https://akrabat.com/feed Software"; } + { url = "https://jasonmccreary.me/feed.atom"; } + { url = "https://martinfowler.com/bliki/bliki.atom"; } + { url = "https://lornajane.net/feed"; } + { url = "https://christoph-rumpel.com/feed.xml"; } + { url = "https://gdstechnology.blog.gov.uk/feed/atom"; } + { url = "https://weierophinney.net/matthew/feeds/index.rss2"; } + { url = "https://stitcher.io/rss"; } + { url = "https://www.reddit.com/r/css.rss"; } + { url = "https://www.reddit.com/r/PHP/.rss"; } + { url = "https://whateverthing.com/atom.xml"; } + { url = "https://mnapoli.fr/atom.xml"; } + { url = "https://www.epicweb.dev/rss.xml?ck_subscriber_id=2498091571"; } + { url = "https://dev.to/feed"; } + { url = "https://localheinz.com/feed.xml"; } + { url = "https://www.ben-morris.com/feed"; } + { url = "https://www.jbrains.ca/rss"; } + { url = "https://blog.thecodewhisperer.com/rss"; } + { url = "https://odan.github.io/feed.xml"; } + { url = "https://feeds.feedburner.com/symfony/blog"; } + { url = "https://www.alwaysagileconsulting.com/feed"; } + { url = "https://blog.sensiolabs.com/feed"; } + { url = "https://pascalbaljetmedia.com/rss"; } + { url = "https://tighten.co/blog/feed.atom"; } + { url = "https://ryangjchandler.co.uk/feed"; } + { url = "https://jnsgr.uk/posts/index.xml"; } + { url = "https://timacdonald.me/feed.xml"; } + { url = "https://phppot.com/feed"; } + { url = "https://howtocodewell.libsyn.com/rss"; } + { url = "https://ctankersley.com/atom.xml"; } + { url = "https://blog.wyrihaximus.net/atom.xml"; } + { url = "https://dotfyle.com/this-week-in-neovim/rss.xml"; } + { url = "https://paul-m-jones.com/feed"; } + { url = "https://www.tomasvotruba.cz/rss.xml"; } + { url = "https://www.reddit.com/r/git/.rss"; } + { url = "https://www.daveismyname.com/feed"; } + { + url = "https://murze.be/feed/php"; + title = "freek.dev"; + tags = [ + "PHP" + "Laravel" + "Software" + ]; + } + { url = "https://nikic.github.io/rss.xml"; } + { + url = "https://drupal.org/planet/rss.xml"; + tags = [ "Drupal" ]; + } + { url = "https://www.bram.us/feed"; } + { url = "https://feeds.feedburner.com/GiantRobotsSmashingIntoOtherGiantRobots"; } + { url = "https://murze.be/feed/originals"; } + { url = "https://www.patkua.com/feed"; } + { url = "https://www.benjystanton.co.uk/feed.xml"; } + { + url = "https://drupal.org/security/rss.xml"; + tags = [ "Drupal" ]; + } + { + url = "https://uk.indeed.com/rss?q=symfony&l=np18"; + tags = [ "Jobs" ]; + } + { + url = "https://uk.indeed.com/rss?q=php&l=np18"; + tags = [ "Jobs" ]; + } + { + url = "https://jobs.drupal.org/all-jobs/feed"; + tags = [ "Jobs" ]; + } + { + url = "https://www.reed.co.uk/jobs/rss/np18?source=rss&keywords=drupal&salaryfrom=50000&sortby=DisplayDate"; + tags = [ "Jobs" ]; + } + { + url = "https://www.reed.co.uk/jobs/rss/np18?source=rss&keywords=php&salaryfrom=50000&sortby=DisplayDate"; + tags = [ "Jobs" ]; + } + { + url = "https://uk.indeed.com/rss?q=drupal&l=np18"; + tags = [ "Jobs" ]; + } + { + url = "https://www.reed.co.uk/jobs/rss/np18?source=rss&keywords=symfony&salaryfrom=50000&sortby=DisplayDate"; + tags = [ "Jobs" ]; + } + { url = "https://emilywebber.co.uk/feed"; } + { url = "https://introvertdear.com/feed"; } + { url = "https://designli.co/blog/feed"; } + { url = "https://www.oliverdavies.uk/rss/daily.xml"; } + { + url = "https://www.drupal.org/project/issues/rss/override_node_options"; + tags = [ "Drupal" ]; + } + { + url = "https://www.drupal.org/project/issues/rss/tailwindcss"; + tags = [ "Drupal" ]; + } + { + url = "https://nixos.org/blog/announcements-rss.xml"; + tags = [ "Linux" ]; + } + { + url = "https://laracasts.com/feed"; + tags = [ + "PHP" + "Laravel" + ]; + } + { + url = "https://feeds.feedburner.com/knpuniversity"; + title = "SymfonyCasts"; + tags = [ + "PHP" + "Symfony" + ]; + } + { + url = "https://nickjanetakis.com/atom.xml"; + title = "Nick Janetakis"; + } + { + url = "https://www.learnlinux.tv/feed"; + tags = [ "Linux" ]; + } + { + url = "https://tailwindcss.com/feeds/feed.xml"; + tags = [ + "Software" + "CSS" + ]; + } + { + url = "https://monospacementor.com/feed"; + tags = [ + "Linux" + "Software" + ]; + } + { + url = "https://frontendmasters.com/blog/feed"; + tags = [ "Software" ]; + title = "Frontend Masters Boost"; + } + { + url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC2aHRY064THg_t7JZoGSYGg"; + title = "YouTube - elysse"; + tags = [ + "Software" + "YouTube" + ]; + } + { + url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCSUA5RARrNt4-Ik3qtbETLQ"; + title = "YouTube - Jason Swett"; + tags = [ + "Software" + "YouTube" + ]; + } + { + url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCorzANoC3fX9VVefJHM5wtA"; + title = "~YouTube - Nick Janetakis"; + tags = [ + "Software" + "YouTube" + ]; + } + { url = "https://devenv.sh/feed_rss_created.xml"; } + { url = "https://sive.rs/en.atom"; } + { url = "https://kressle.in/feed.xml"; } + { + url = "https://github.com/sculpin/sculpin/releases.atom"; + tags = [ + "PHP" + "Sculpin" + "Open Source" + ]; + } + { url = "https://www.theminimalists.com/feed"; } + { url = "https://opensourcepledge.com/rss.xml"; } + { + url = "https://feeds.bbci.co.uk/sport/rugby-union/teams/ng-dragons/rss.xml"; + tags = [ "Rugby" ]; + } + { + url = "https://openrss.org/www.twitch.tv/thealtf4stream/videos?filter=all&sort=time"; + tags = [ "Twitch" ]; + } + { + url = "https://openrss.org/www.twitch.tv/theprimeagen/videos?filter=all&sort=time"; + tags = [ "Twitch" ]; + } + { + url = "https://openrss.org/www.twitch.tv/teej_dv/videos?filter=all&sort=time"; + tags = [ "Twitch" ]; + } + { + url = "https://openrss.org/www.twitch.tv/monospacementor/videos?filter=all&sort=time"; + tags = [ "Twitch" ]; + } + { url = "https://www.reddit.com/r/librewolf/new/.rss"; } + { + url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCSJKQnpmPcdkysduL0mNktg"; + title = "YouTube - teej_daily"; + tags = [ + "Software" + "YouTube" + ]; + } + { + url = "https://feeds.bbci.co.uk/sport/rugby-union/rss.xml"; + tags = [ "Rugby" ]; + } + { + url = "https://feeds.bbci.co.uk/sport/rugby-union/teams/ng-dragons/rss.xml"; + tags = [ "Rugby" ]; + } + ]; + }; + }; + +}