File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 5353
5454unset NIXOS_CONFIG
5555
56- tempdir=$( mktemp -d)
57- cleanup () {
58- rm -rf " $tempdir "
59- }
60- trap cleanup EXIT SIGINT SIGQUIT ERR
61-
6256if [[ -z " $flake_uri " ]]; then
6357 extraBuildFlags+=(
6458 -I " nixos-config=$nixos_config "
6559 )
6660else
6761 extraBuildFlags+=(
68- --extra-experimental-features " flakes"
62+ --extra-experimental-features " nix-command flakes"
6963 --argstr flakeStr " $flake "
7064 --argstr flakeUri " $flake_uri "
7165 --argstr flakeAttr " ${flake_attr:- " vm" } "
7266 )
7367fi
7468
75- nix-build " ${script_dir} /../share/nixos-shell.nix" -A " config.system.build.vm" -k \
76- -o " ${tempdir} /result" \
77- " ${extraBuildFlags[@]} "
69+ nix run config.system.build.vm \
70+ --file " ${script_dir} /../share/nixos-shell.nix" \
71+ --keep-going \
72+ " ${extraBuildFlags[@]} " \
7873 " $@ "
79- " ${tempdir} /result/bin/" run-* -vm
You can’t perform that action at this time.
0 commit comments