Skip to content

Commit 2aa602a

Browse files
bjackmanastro
authored andcommitted
fireracker: Add extraArgs option
For experimentation, support adding arbitrary extra args.
1 parent 604f9d0 commit 2aa602a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/runners/firecracker.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ in {
9595
then socket
9696
else throw "Firecracker must be configured with an API socket (option microvm.socket)!"
9797
)
98-
] ++ lib.optional (lib.versionAtLeast pkgs.firecracker.version "1.13.0") "--enable-pci");
98+
]
99+
++ lib.optional (lib.versionAtLeast pkgs.firecracker.version "1.13.0") "--enable-pci")
100+
++ microvmConfig.firecracker.extraArgs;
99101

100102
preStart = ''
101103
${preStart}

nixos-modules/microvm/options.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,12 @@ in
606606
description = "Type of IO engine to use for Firecracker drives (disks).";
607607
};
608608

609+
firecracker.extraArgs = mkOption {
610+
type = with types; listOf str;
611+
default = [];
612+
description = "Extra arguments to pass to firecracker.";
613+
};
614+
609615
firecracker.extraConfig = mkOption {
610616
type = types.attrs;
611617
default = {};

0 commit comments

Comments
 (0)