nix: pass through exec arguments
This is useful for when a wrapper script is unnecessary. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
		
							parent
							
								
									2a4e2724a3
								
							
						
					
					
						commit
						32c90ef4e7
					
				
							
								
								
									
										14
									
								
								nixos.nix
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								nixos.nix
									
									
									
									
									
								
							| @ -88,11 +88,15 @@ in | |||||||
| 
 | 
 | ||||||
|                   conf = { |                   conf = { | ||||||
|                     inherit (app) id; |                     inherit (app) id; | ||||||
|                     path = pkgs.writeScript "${app.name}-start" '' |                     path = | ||||||
|                       #!${pkgs.zsh}${pkgs.zsh.shellPath} |                       if app.path == null then | ||||||
|                       ${script} |                         pkgs.writeScript "${app.name}-start" '' | ||||||
|                     ''; |                           #!${pkgs.zsh}${pkgs.zsh.shellPath} | ||||||
|                     args = [ "${app.name}-start" ]; |                           ${script} | ||||||
|  |                         '' | ||||||
|  |                       else | ||||||
|  |                         app.path; | ||||||
|  |                     args = if app.args == null then [ "${app.name}-start" ] else app.args; | ||||||
| 
 | 
 | ||||||
|                     confinement = { |                     confinement = { | ||||||
|                       app_id = aid; |                       app_id = aid; | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								options.nix
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								options.nix
									
									
									
									
									
								
							| @ -94,6 +94,24 @@ in | |||||||
|                 ''; |                 ''; | ||||||
|               }; |               }; | ||||||
| 
 | 
 | ||||||
|  |               path = mkOption { | ||||||
|  |                 type = nullOr str; | ||||||
|  |                 default = null; | ||||||
|  |                 description = '' | ||||||
|  |                   Custom executable path. | ||||||
|  |                   Setting this to null will default to the start script. | ||||||
|  |                 ''; | ||||||
|  |               }; | ||||||
|  | 
 | ||||||
|  |               args = mkOption { | ||||||
|  |                 type = nullOr (listOf str); | ||||||
|  |                 default = null; | ||||||
|  |                 description = '' | ||||||
|  |                   Custom args. | ||||||
|  |                   Setting this to null will default to script name. | ||||||
|  |                 ''; | ||||||
|  |               }; | ||||||
|  | 
 | ||||||
|               script = mkOption { |               script = mkOption { | ||||||
|                 type = nullOr str; |                 type = nullOr str; | ||||||
|                 default = null; |                 default = null; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user