mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
parent
03b622b356
commit
ef148ab3cb
5 changed files with 50 additions and 2 deletions
|
@ -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
|
||||
`$HOME/.zsh_history` and `dotDir` path is not prepended to it
|
||||
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}"'';
|
||||
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 = ''
|
||||
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