blob: 228dc6379fd6024f846d463f34e44b85a246573f (
plain) (
tree)
|
|
{ config, lib, pkgs, ... }:
with lib;
{
options = {
programs.zsh.functions = mkOption {
description = "An attribute set that maps function names to their source";
default = { };
type = with types; attrsOf (either str path);
};
};
config.programs.zsh.initExtra = concatStringsSep "\n" (
mapAttrsToList
(name: funSrc: ''
function ${name}() {
${funSrc}
}
'')
config.programs.zsh.functions
);
}
|