mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
modules/nix-search-tv: add run and shell actions
This commit is contained in:
committed by
Austin Horstman
parent
ffbd94a1c9
commit
5826802354
@@ -80,6 +80,15 @@ in
|
||||
|
||||
source.command = "${path} print";
|
||||
preview.command = ''${path} preview "{}"'';
|
||||
|
||||
actions.run = {
|
||||
command = ''nix run {replace:s/\/ /#/g}'';
|
||||
mode = "fork";
|
||||
};
|
||||
actions.shell = {
|
||||
command = ''nix shell {replace:s/\/ /#/g}'';
|
||||
mode = "execute";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
assertFileExists home-files/.config/television/cable/nix-search-tv.toml
|
||||
assertFileContent home-files/.config/television/cable/nix-search-tv.toml \
|
||||
${pkgs.writeText "settings-expected" ''
|
||||
[actions.run]
|
||||
command = "nix run {replace:s/\\/ /#/g}"
|
||||
mode = "fork"
|
||||
|
||||
[actions.shell]
|
||||
command = "nix shell {replace:s/\\/ /#/g}"
|
||||
mode = "execute"
|
||||
|
||||
[metadata]
|
||||
description = "Search nix options and packages"
|
||||
name = "nix-search-tv"
|
||||
|
||||
Reference in New Issue
Block a user