diff options
author | Ryan Orendorff <ryan@orendorff.io> | 2019-09-24 01:16:49 -0700 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-02-20 00:03:21 +0100 |
commit | 2f51b9e418092d1866584547e5b83622b326b3dd (patch) | |
tree | ded7615118fde2575c116d4f4bb556d5239c4911 /modules/programs/fish.nix | |
parent | 4f532948f7d12d4f7c36817173c83be9138b7abd (diff) |
fish: add pluginModule type
Similar to zsh's `pluginModule` type, but without an initialization
file.
Diffstat (limited to 'modules/programs/fish.nix')
-rw-r--r-- | modules/programs/fish.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 57c6409f2b7..12f33304b92 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -6,6 +6,29 @@ let 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" ( mapAttrsToList (k: v: "abbr --add --global ${k} '${v}'") cfg.shellAbbrs ); |