Files
home-manager/modules/programs/eilmeldung.nix
Rachit Kumar Verma 15253ef574 eilmeldung: init module
eilmeldung is a fast TUI RSS reader built on the news-flash library.
It provides Vim-inspired keybindings, a non-blocking interface and instant
startup, while keeping the interface uncluttered. Articles can be searched and
filtered using a powerful query language, tagged for later reference, and read
in a distraction-free "zen mode".
2026-08-23 21:00:38 -05:00

86 lines
1.9 KiB
Nix

{
config,
lib,
pkgs,
...
}:
let
inherit (lib)
mkEnableOption
mkPackageOption
mkOption
mkIf
;
cfg = config.programs.eilmeldung;
tomlFormat = pkgs.formats.toml { };
in
{
meta.maintainers = [
lib.maintainers.christo-auer
lib.maintainers.rachitvrma
];
options.programs.eilmeldung = {
enable = mkEnableOption "eilmeldung, a TUI news feed reader";
package = mkPackageOption pkgs "eilmeldung" { nullable = true; };
settings = mkOption {
inherit (tomlFormat) type;
default = { };
example = {
mouse_support = true;
feed_list = [
"query: \"Marked\" marked"
"query: \"Reviews\" #reviews"
"feeds"
"* categories"
"tags"
];
startup_commands = [ "sync" ];
after_sync_commands = [
"query lastsync"
"tag rust title:\"rust\""
"read title:/^Advertisement/"
"refresh"
];
video_enclosure_command = "mpv {url}";
audio_enclosure_command = "mpv --no-audio {url}";
share_targets = [
"clipboard"
"feh feh \"{url}\""
];
input_config.mappings = {
"; i" = [ "cmd hintshare feh" ];
"y" = [
"confirm in articles read all"
"nextunread"
];
};
};
description = ''
Configuration written to
{file}`$XDG_CONFIG_HOME/eilmeldung/config.toml`.
See
<https://github.com/christo-auer/eilmeldung/blob/main/docs/configuration.md>
for the full list of options.
'';
};
};
config = mkIf cfg.enable {
home.packages = mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."eilmeldung/config.toml" = mkIf (cfg.settings != { }) {
source = tomlFormat.generate "eilmeldung-config.toml" cfg.settings;
};
};
}