mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-10-31 13:50:04 +00:00 
			
		
		
		
	🚧 Update user configuration loading and use formatter
This commit is contained in:
		
							parent
							
								
									cd32ad1c61
								
							
						
					
					
						commit
						54edba0070
					
				
					 12 changed files with 83 additions and 146 deletions
				
			
		|  | @ -1,8 +1,13 @@ | |||
| { lib, self, ... }: { | ||||
| { | ||||
|   lib, | ||||
|   self, | ||||
|   ... | ||||
| }: { | ||||
|   # Create a NixOS module option on a single line. | ||||
|   mkOpt = type: default: description: | ||||
|     lib.mkOption {inherit type default description;}; | ||||
| 
 | ||||
|   # Create a simple bool options | ||||
|   mkBool = default: description: | ||||
|     lib.mkOption { | ||||
|       inherit default description; | ||||
|  | @ -10,20 +15,17 @@ | |||
|     }; | ||||
| 
 | ||||
|   # Create a module compliant with the NixOS module system. | ||||
|   mkModule = | ||||
|     { | ||||
|       name ? "puzzlevision", | ||||
|       class, | ||||
|       modules, | ||||
|     }: { | ||||
|       _class = class; | ||||
| 
 | ||||
|       # Template: "[path-to-flake]/flake.nix#[class-name]Modules.[module-name]" | ||||
|       # Example: "[path-to-flake]/flake.nix#nixosModules.system.audio" | ||||
|       _file = "${self.outPath}/flake.nix#${class}Modules.${name}"; | ||||
| 
 | ||||
|       imports = modules; | ||||
|     }; | ||||
|   mkModule = { | ||||
|     name ? "puzzlevision", | ||||
|     class, | ||||
|     modules, | ||||
|   }: { | ||||
|     _class = class; | ||||
|     # Template: "[path-to-flake]/flake.nix#[class-name]Modules.[module-name]" | ||||
|     # Example: "[path-to-flake]/flake.nix#nixosModules.system.audio" | ||||
|     _file = "${self.outPath}/flake.nix#${class}Modules.${name}"; | ||||
|     imports = modules; | ||||
|   }; | ||||
| 
 | ||||
|   # TODO: add mkIfElse function | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue