parent
03b622b356
commit
ef148ab3cb
|
@ -81,3 +81,6 @@ changes are only active if the `home.stateVersion` option is set to
|
||||||
using the xdg module. Also, the default value is fixed to
|
using the xdg module. Also, the default value is fixed to
|
||||||
`$HOME/.zsh_history` and `dotDir` path is not prepended to it
|
`$HOME/.zsh_history` and `dotDir` path is not prepended to it
|
||||||
anymore.
|
anymore.
|
||||||
|
* The newsboat module will now default in displaying `queries` before `urls` in
|
||||||
|
its main window. This makes sense in the case when one has a lot of URLs and
|
||||||
|
few queries.
|
||||||
|
|
|
@ -102,7 +102,11 @@ in {
|
||||||
|
|
||||||
mkQueryEntry = n: v: ''"query:${n}:${escape [ ''"'' ] v}"'';
|
mkQueryEntry = n: v: ''"query:${n}:${escape [ ''"'' ] v}"'';
|
||||||
queries = mapAttrsToList mkQueryEntry cfg.queries;
|
queries = mapAttrsToList mkQueryEntry cfg.queries;
|
||||||
in concatStringsSep "\n" (urls ++ queries) + "\n";
|
in concatStringsSep "\n"
|
||||||
|
(if versionAtLeast config.home.stateVersion "20.03" then
|
||||||
|
queries ++ urls
|
||||||
|
else
|
||||||
|
urls ++ queries) + "\n";
|
||||||
|
|
||||||
home.file.".newsboat/config".text = ''
|
home.file.".newsboat/config".text = ''
|
||||||
max-items ${toString cfg.maxItems}
|
max-items ${toString cfg.maxItems}
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
{ newsboat-basics = ./newsboat-basics.nix; }
|
{
|
||||||
|
newsboat-basics = ./newsboat-basics.nix;
|
||||||
|
newsboat-basics-2003 = ./newsboat-basics-2003.nix;
|
||||||
|
}
|
||||||
|
|
35
tests/modules/programs/newsboat/newsboat-basics-2003.nix
Normal file
35
tests/modules/programs/newsboat/newsboat-basics-2003.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
home.stateVersion = "20.03";
|
||||||
|
|
||||||
|
programs.newsboat = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
urls = [
|
||||||
|
{
|
||||||
|
url = "http://example.org/feed.xml";
|
||||||
|
tags = [ "tag1" "tag2" ];
|
||||||
|
title = "Cool feed";
|
||||||
|
}
|
||||||
|
|
||||||
|
{ url = "http://example.org/feed2.xml"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
queries = { "foo" = ''rssurl =~ "example.com"''; };
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: { newsboat = pkgs.writeScriptBin "dummy-newsboat" ""; })
|
||||||
|
];
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileContent \
|
||||||
|
home-files/.newsboat/urls \
|
||||||
|
${./newsboat-basics-urls-2003.txt}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
"query:foo:rssurl =~ \"example.com\""
|
||||||
|
http://example.org/feed.xml "tag1" "tag2" "~Cool feed"
|
||||||
|
http://example.org/feed2.xml
|
Loading…
Reference in a new issue