From 2c9562e7624fa1b50983fc18d504bf86202bef49 Mon Sep 17 00:00:00 2001 From: mrtnvgr Date: Thu, 29 Feb 2024 23:07:31 +0700 Subject: [PATCH] feat: add `--special-arg` option --- nixos-generate | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos-generate b/nixos-generate index 8a8958a..6d66640 100755 --- a/nixos-generate +++ b/nixos-generate @@ -42,6 +42,7 @@ Options: * -o, --out-link: specify the outlink location for nix-build * --cores : to control the maximum amount of parallelism. (see nix-build documentation) * --option : Passed to nix-build (see nix-build documentation). +* --special-arg : Passed to the `specialArgs` variable * -I KEY=VALUE: Add a key to the Nix expression search path. USAGE } @@ -83,6 +84,10 @@ while [[ $# -gt 0 ]]; do nix_build_args+=("--argstr" "diskSize" "$2") shift ;; + --special-arg) + nix_build_args+=("--argstr" "$2" "$3") + shift 2 + ;; --option) nix_build_args+=("$1" "$2" "$3") shift 2