mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-10-31 13:50:04 +00:00 
			
		
		
		
	✨ finalize home configuration loading as nixos module, and more stuffs :3
This commit is contained in:
		
							parent
							
								
									f89cbcc552
								
							
						
					
					
						commit
						dc87b2c186
					
				
					 16 changed files with 192 additions and 87 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| {lib, ...}: { | ||||
| { lib, self, ... }: { | ||||
|   # Create a NixOS module option on a single line. | ||||
|   mkOpt = type: default: description: | ||||
|     lib.mkOption {inherit type default description;}; | ||||
|  | @ -9,5 +9,21 @@ | |||
|       type = lib.types.bool; | ||||
|     }; | ||||
| 
 | ||||
|   # Todo: add mkIfElse function | ||||
|   # 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; | ||||
|     }; | ||||
| 
 | ||||
|   # TODO: add mkIfElse function | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue