2.home-manager/tests/modules/programs/nix-search-tv/television.nix
Poseidon 3c3510e61c programs/nix-search-tv: add quotes
Add quotes to the preview command to prevent the shell from interpreting
options with `<name>` as writing the output of the command name to a
file with the name of the remainder of the option name.
2025-08-20 20:30:51 -05:00

22 lines
608 B
Nix

{ lib, pkgs, ... }:
{
programs.television.enable = true;
programs.nix-search-tv.enable = true;
nmt.script = ''
assertFileExists home-files/.config/television/cable/nix-search-tv.toml
assertFileContent home-files/.config/television/cable/nix-search-tv.toml \
${pkgs.writeText "settings-expected" ''
[metadata]
description = "Search nix options and packages"
name = "nix-search-tv"
[preview]
command = "${lib.getExe pkgs.nix-search-tv} preview \"{}\""
[source]
command = "${lib.getExe pkgs.nix-search-tv} print"
''}
'';
}