restructured repo to support nix-darwin
This commit is contained in:
		
							parent
							
								
									3924a5aa8d
								
							
						
					
					
						commit
						0d0443a02a
					
				
					 47 changed files with 111 additions and 34 deletions
				
			
		
							
								
								
									
										26
									
								
								modules/nixos-modules/home-manager/i18n.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								modules/nixos-modules/home-manager/i18n.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   home-users = lib.attrsets.mapAttrsToList (_: user: user) config.home-manager.users; | ||||
| in { | ||||
|   config = { | ||||
|     i18n.supportedLocales = | ||||
|       lib.unique | ||||
|       (builtins.map (l: (lib.replaceStrings ["utf8" "utf-8" "UTF8"] ["UTF-8" "UTF-8" "UTF-8"] l) + "/UTF-8") ( | ||||
|         [ | ||||
|           "C.UTF-8" | ||||
|           "en_US.UTF-8" | ||||
|           config.i18n.defaultLocale | ||||
|         ] | ||||
|         ++ (lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings)) | ||||
|         ++ ( | ||||
|           map (user-config: user-config.i18n.defaultLocale) home-users | ||||
|         ) | ||||
|         ++ (lib.lists.flatten ( | ||||
|           map (user-config: lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") user-config.i18n.extraLocaleSettings)) home-users | ||||
|         )) | ||||
|       )); | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue