1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-14 04:51:08 +01:00

television: add module (#6866)

This commit is contained in:
awwpotato 2025-04-21 10:26:20 -07:00 committed by GitHub
parent be4e5ec62c
commit 22b326b42b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,10 @@
{
time = "2025-04-21T03:27:49+00:00";
condition = true;
message = ''
A new module is available: `programs.television`
television is a cross-platform, fast and extensible general purpose fuzzy
finder TUI.
'';
}

View file

@ -263,6 +263,7 @@ let
./programs/swayr.nix
./programs/taskwarrior.nix
./programs/tealdeer.nix
./programs/television.nix
./programs/terminator.nix
./programs/termite.nix
./programs/tex-fmt.nix

View file

@ -0,0 +1,48 @@
{
lib,
pkgs,
config,
...
}:
let
tomlFormat = pkgs.formats.toml { };
cfg = config.programs.television;
in
{
meta.maintainers = [ lib.maintainers.awwpotato ];
options.programs.television = {
enable = lib.mkEnableOption "television";
package = lib.mkPackageOption pkgs "television" { nullable = true; };
settings = lib.mkOption {
type = tomlFormat.type;
default = { };
example = lib.literalExpression ''
{
tick_rate = 50;
ui = {
use_nerd_font_icons = true;
ui_scale = 120;
show_preview_panel = false;
};
keybindings = {
quit = [ "esc" "ctrl-c" ];
};
}
'';
description = ''
Configuration written to {file}`$XDG_CONFIG_HOME/television/config.toml`.
See <https://github.com/alexpasmantier/television/blob/main/.config/config.toml>
for the full list of options.
'';
};
};
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."television/config.toml" = lib.mkIf (cfg.settings != { }) {
source = tomlFormat.generate "config.toml" cfg.settings;
};
};
}