File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 43
43
${ preStart }
44
44
${ createVolumesScript vmHostPackages microvmConfig . volumes }
45
45
${ lib . optionalString ( hypervisorConfig . requiresMacvtapAsFds or false ) openMacvtapFds }
46
+ runtime_args=${ lib . optionalString ( microvmConfig . extraArgsScript != null ) ''
47
+ $(${ microvmConfig . extraArgsScript } )
48
+ '' }
46
49
47
- exec ${ execArg } ${ command }
50
+ exec ${ execArg } ${ command } '' ${runtime_args:-}
48
51
'' ;
49
52
} // lib . optionalAttrs canShutdown {
50
53
microvm-shutdown = shutdownCommand ;
Original file line number Diff line number Diff line change 63
63
type = types . lines ;
64
64
} ;
65
65
66
+ extraArgsScript = mkOption {
67
+ type = types . nullOr types . str ;
68
+ default = null ;
69
+ description = ''
70
+ A script to provide additional arguments for the hypervisor at runtime.
71
+
72
+ The script must output a single line with arguments for the hypervisor.
73
+ '' ;
74
+ } ;
75
+
66
76
socket = mkOption {
67
77
description = "Hypervisor control socket path" ;
68
78
default = "${ hostName } .sock" ;
You can’t perform that action at this time.
0 commit comments