aboutsummaryrefslogtreecommitdiff
path: root/home/profiles
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-13 15:22:30 +0900
committersefidel <contact@sefidel.net>2024-02-13 15:22:30 +0900
commitfaf0d2472021006870ed60cb932e4e03b154a54e (patch)
tree01f9a42b83c836632d3016a319139c3acae3961b /home/profiles
parent9cd26276f8f2aed20c6b04cff4eb3d5009cc9ffb (diff)
downloadnixrc-faf0d2472021006870ed60cb932e4e03b154a54e.zip
feat(home/multimedia): add newsboat
Diffstat (limited to 'home/profiles')
-rw-r--r--home/profiles/multimedia/default.nix51
1 files changed, 50 insertions, 1 deletions
diff --git a/home/profiles/multimedia/default.nix b/home/profiles/multimedia/default.nix
index bb4a8fd..5890fb7 100644
--- a/home/profiles/multimedia/default.nix
+++ b/home/profiles/multimedia/default.nix
@@ -1,5 +1,8 @@
{ config, lib, pkgs, ... }:
-let cfg = config.profiles.multimedia;
+let
+ cfg = config.profiles.multimedia;
+
+ fixSopsPrefix = x: y: builtins.replaceStrings [ "%r" ] [ "/run/user/${toString x}" ] y;
in
{
imports = [
@@ -14,6 +17,52 @@ in
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ vlc playerctl cider spotify ];
+ sops.secrets.freshrss-api-password = { };
+
+ programs.newsboat = {
+ enable = true;
+ autoReload = true;
+
+ extraConfig = ''
+ urls-source "freshrss"
+ freshrss-url "https://rss.exotic.sh/api/greader.php"
+ freshrss-login "sefidel"
+ freshrss-passwordeval "cat ${fixSopsPrefix 1000 config.sops.secrets.freshrss-api-password.path}"
+
+ # Vim-like movement
+ bind-key j down feedlist
+ bind-key k up feedlist
+ bind-key j next articlelist
+ bind-key k prev articlelist
+ bind-key J next-feed articlelist
+ bind-key K prev-feed articlelist
+ bind-key j down article
+ bind-key k up article
+
+ # Colorscheme to work with softjelly
+ color listnormal white default
+ color listnormal_unread white default
+ color listfocus white default reverse bold
+ color listfocus_unread white default reverse bold
+ color info yellow black
+ color background white default
+ color article white default
+
+ # Additional Highlight groups
+ highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
+ highlight article "(^Link:.*|^Date:.*)" default default
+ highlight article "https?://[^ ]+" green default
+
+ highlight article "^(Title):.*$" blue default
+ highlight article "\\[[0-9][0-9]*\\]" magenta default bold
+ highlight article "\\[image\\ [0-9]+\\]" green default bold
+ highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
+ highlight article ":.*\\(link\\)$" cyan default
+ highlight article ":.*\\(image\\)$" blue default
+ highlight article ":.*\\(embedded flash\\)$" magenta default
+ '';
+ };
+
nixpkgs.allowedUnfree = [ "spotify" ];
};
}