1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 12:51:08 +01:00
Files
niveum/configs/newsboat.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
2020-04-15 20:36:10 +02:00
let
newsboat-home = "${config.users.users.me.home}/cloud/syncthing/common/newsboat";
scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
linkhandler-bin = "${scripts.linkhandler}/bin/linkhandler";
2020-04-13 11:55:47 +02:00
newsboat-config = pkgs.writeText "config" ''
auto-reload yes
2020-04-15 20:36:10 +02:00
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler-bin} {}'"
browser ${linkhandler-bin}
2020-04-13 11:55:47 +02:00
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 end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
2020-04-15 16:04:42 +02:00
save-path ${newsboat-home}/saved/
2020-04-15 20:36:10 +02:00
color listnormal cyan default
color listfocus black yellow standout bold
color listnormal_unread blue default
color listfocus_unread yellow default bold
color info red black bold
'';
in
{
nixpkgs.config.packageOverrides = pkgs: {
newsboat = pkgs.writers.writeDashBin "newsboat" ''
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@"
'';
2019-09-24 16:44:15 +02:00
};
environment.systemPackages = [ pkgs.newsboat ];
2019-09-24 16:44:15 +02:00
}