Skip to content

Commit bb5ed0c

Browse files
committed
pkgs/microvm-command: accept -- nix args
1 parent b0e7ee7 commit bb5ed0c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkgs/microvm-command.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ writeShellScriptBin "microvm" ''
6262
done
6363
# consume all $@ that were processed by getopts
6464
shift $((OPTIND -1))
65+
NIX_ARGS=("$@")
6566
DIR=$STATE_DIR/$NAME
6667
6768
build() {
@@ -74,15 +75,15 @@ writeShellScriptBin "microvm" ''
7475
7576
FLAKE=$(cat flake)
7677
77-
nix build -o current "$FLAKE"#nixosConfigurations."$NAME".config.microvm.declaredRunner >/dev/null
78+
nix build "''${NIX_ARGS[@]}" -o current "$FLAKE"#nixosConfigurations."$NAME".config.microvm.declaredRunner >/dev/null
7879
chmod -R u+rwX .
7980
}
8081
8182
case $ACTION in
8283
help)
8384
echo Help:
8485
cat << EOF
85-
Usage: $0 <action> [flags]
86+
Usage: $0 <action> [flags] [-- <nix args>]
8687
8788
Actions:
8889
-c <name> Create a MicroVM

0 commit comments

Comments
 (0)