From 4ce9b6ee866f73cf745d09712285870f5608a401 Mon Sep 17 00:00:00 2001 From: Vladimir Serov Date: Sun, 29 Dec 2019 18:41:26 +0300 Subject: [PATCH] [feat] using remote configs for appvm creation --- appvm.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appvm.go b/appvm.go index eef7a5b..2ba2af5 100644 --- a/appvm.go +++ b/appvm.go @@ -99,7 +99,7 @@ var xmlTmpl = ` ` func evalNix(expr string) (s string) { - command := exec.Command("nix", "eval", expr) + command := exec.Command("nix", "eval", "--raw", expr) bytes, _ := command.Output() s = string(bytes) return @@ -213,9 +213,11 @@ func streamStdOutErr(command *cmd.Cmd) { } func generateVM(name string, verbose bool) (realpath, reginfo, qcow2 string, err error) { + vmConfigPath := getAppVMExpressionPath(name) + log.Print(vmConfigPath) command := cmd.NewCmdOptions(cmd.Options{Buffered: false, Streaming: true}, "nix-build", "", "-A", "config.system.build.vm", - "-I", "nixos-config=nix/"+name+".nix", "-I", ".") + "-I", "nixos-config="+vmConfigPath, "-I", ".") if verbose { go streamStdOutErr(command) }