about summary refs log tree commit diff
path: root/home/profiles/multimedia/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/profiles/multimedia/default.nix')
-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" ];
   };
 }