25 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { lib, config, ... }:
 | |
| 
 | |
| let
 | |
|   inherit (lib) mkIf mkEnableOption;
 | |
|   adminShell = config.systemModules.host.admin.shell;
 | |
|   cfg = config.systemModules.shell.zsh;
 | |
| in
 | |
| 
 | |
| {
 | |
| 
 | |
|   options.systemModules.shell.zsh.enable = mkEnableOption "Enable zsh module";
 | |
| 
 | |
|   config = mkIf (adminShell == "zsh" || cfg.enable) {
 | |
|     programs.zsh = {
 | |
|       enable = true;
 | |
|       enableCompletion = true;
 | |
|       syntaxHighlighting.enable = true;
 | |
|       autosuggestions = {
 | |
|         enable = true;
 | |
|         async = true;
 | |
|       };
 | |
|     };
 | |
|     environment.pathsToLink = ["/share/zsh"];
 | |
|   };
 | |
| }
 |