chore: make namespace generic so people can copy easier
This commit is contained in:
		
							parent
							
								
									0158f7ff06
								
							
						
					
					
						commit
						0562818aa7
					
				
					 45 changed files with 249 additions and 217 deletions
				
			
		|  | @ -1,22 +1,22 @@ | |||
| { | ||||
|   options, | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   namespace, | ||||
|   options, | ||||
|   ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.wyrdgard; | ||||
| with lib.${namespace}; | ||||
| let | ||||
|   cfg = config.wyrdgard.tools.direnv; | ||||
|   cfg = config.${namespace}.tools.direnv; | ||||
| in | ||||
| { | ||||
|   options.wyrdgard.tools.direnv = with types; { | ||||
|   options.${namespace}.tools.direnv = with types; { | ||||
|     enable = mkBoolOpt false "Whether or not to enable direnv."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|     wyrdgard.home.extraOptions = { | ||||
|     ${namespace}.home.extraOptions = { | ||||
|       programs.direnv = { | ||||
|         enable = true; | ||||
|         nix-direnv = enabled; | ||||
|  |  | |||
|  | @ -1,18 +1,19 @@ | |||
| { | ||||
|   options, | ||||
|   config, | ||||
|   lib, | ||||
|   namespace, | ||||
|   options, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; | ||||
| with lib.wyrdgard; | ||||
| with lib.${namespace}; | ||||
| let | ||||
|   cfg = config.wyrdgard.tools.git; | ||||
|   user = config.wyrdgard.user; | ||||
|   cfg = config.${namespace}.tools.git; | ||||
|   user = config.${namespace}.user; | ||||
| in | ||||
| { | ||||
|   options.wyrdgard.tools.git = with types; { | ||||
|   options.${namespace}.tools.git = with types; { | ||||
|     enable = mkBoolOpt true "Wether or not to enable git (Default enabled)"; | ||||
|     userName = mkOpt types.str user.fullName "The name to use git with"; | ||||
|     userEmail = mkOpt types.str user.email "The email to use git with"; | ||||
|  | @ -26,7 +27,7 @@ in | |||
|       gitbutler | ||||
|     ]; | ||||
| 
 | ||||
|     wyrdgard.home.extraOptions = { | ||||
|     ${namespace}.home.extraOptions = { | ||||
|       programs.git = { | ||||
|         enable = true; | ||||
|         inherit (cfg) userName userEmail; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue