nixos/nspawn-container: rename initArgs to cmdline

This commit is contained in:
Kierán Meinhardt
2026-01-19 10:36:38 +01:00
parent 835e38cf1a
commit 7ba279d21e
2 changed files with 4 additions and 4 deletions
@@ -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,
)