git-subtree-dir: users/glittershark/system git-subtree-mainline:85d82a9dc2git-subtree-split:3b174300ae
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			455 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			455 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ 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
 | 
						|
  );
 | 
						|
}
 |