forked from fabian/nix
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			717 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			717 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  pkgs,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
with lib; let
 | 
						|
  cfg = config.local.services.zsh;
 | 
						|
in {
 | 
						|
  options.local.services.zsh = {
 | 
						|
    enable = mkEnableOption "zsh settings";
 | 
						|
    prompt = mkOption {
 | 
						|
      type = types.str;
 | 
						|
      description = "prompt for your terminal";
 | 
						|
      example = literalExpression "%B[%~] \${vcs_info_msg_0_}%b";
 | 
						|
    };
 | 
						|
  };
 | 
						|
  config = mkIf cfg.enable {
 | 
						|
    programs.zsh = {
 | 
						|
      enable = true;
 | 
						|
      syntaxHighlighting.enable = true;
 | 
						|
      autosuggestion.enable = true;
 | 
						|
 | 
						|
      history = {
 | 
						|
        append = true;
 | 
						|
        expireDuplicatesFirst = true;
 | 
						|
        ignoreAllDups = true;
 | 
						|
        ignoreSpace = true;
 | 
						|
      };
 | 
						|
 | 
						|
      initContent = import ./zshrc.nix {inherit config lib pkgs;};
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |