From 2f51b9e418092d1866584547e5b83622b326b3dd Mon Sep 17 00:00:00 2001 From: Ryan Orendorff Date: Tue, 24 Sep 2019 01:16:49 -0700 Subject: [PATCH] fish: add pluginModule type Similar to zsh's `pluginModule` type, but without an initialization file. --- modules/programs/fish.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 57c6409f..12f33304 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. + + Relevant pieces will be added to the fish function path and + the completion path. The init.fish and + key_binding.fish 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 );