mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
fish: add pluginModule type
Similar to zsh's `pluginModule` type, but without an initialization file.
This commit is contained in:
parent
4f532948f7
commit
2f51b9e418
1 changed files with 23 additions and 0 deletions
|
@ -6,6 +6,29 @@ let
|
||||||
|
|
||||||
cfg = config.programs.fish;
|
cfg = config.programs.fish;
|
||||||
|
|
||||||
|
pluginModule = types.submodule ({ config, ... }: {
|
||||||
|
options = {
|
||||||
|
src = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
description = ''
|
||||||
|
Path to the plugin folder.
|
||||||
|
</para><para>
|
||||||
|
Relevant pieces will be added to the fish function path and
|
||||||
|
the completion path. The <filename>init.fish</filename> and
|
||||||
|
<filename>key_binding.fish</filename> files are sourced if
|
||||||
|
they exist.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = ''
|
||||||
|
The name of the plugin.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
abbrsStr = concatStringsSep "\n" (
|
abbrsStr = concatStringsSep "\n" (
|
||||||
mapAttrsToList (k: v: "abbr --add --global ${k} '${v}'") cfg.shellAbbrs
|
mapAttrsToList (k: v: "abbr --add --global ${k} '${v}'") cfg.shellAbbrs
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue