nixos/nspawn-container: rename initArgs to cmdline
This commit is contained in:
@@ -120,7 +120,7 @@ in
|
||||
default = vlansNumbered // cfg.interfaces;
|
||||
};
|
||||
|
||||
virtualisation.initArgs = lib.mkOption {
|
||||
virtualisation.cmdline = lib.mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [
|
||||
@@ -249,7 +249,7 @@ in
|
||||
interfaces=${toPythonExpression (lib.attrValues cfg.allInterfaces)}, # noqa
|
||||
nspawn_options=${toPythonExpression config.virtualisation.systemd-nspawn.options} + sys.argv[1:], # noqa
|
||||
init=${toPythonStr "${config.system.build.toplevel}/init"}, # noqa
|
||||
init_args=${toPythonExpression cfg.initArgs}, # noqa
|
||||
cmdline=${toPythonExpression cfg.cmdline}, # noqa
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -130,7 +130,7 @@ def run(
|
||||
interfaces: dict,
|
||||
nspawn_options: list[str],
|
||||
init: str,
|
||||
init_args: list[str],
|
||||
cmdline: list[str],
|
||||
) -> None:
|
||||
logging.basicConfig(
|
||||
format=f"nixos-nspawn({container_name}): %(message)s",
|
||||
@@ -174,7 +174,7 @@ def run(
|
||||
f"--directory={root_dir}",
|
||||
f"--network-namespace-path={netns.path}",
|
||||
init,
|
||||
*init_args,
|
||||
*cmdline,
|
||||
],
|
||||
preexec_fn=print_pid,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user