VirtualMachine: Make VPN optional

Change-Id: I22c8235a651969665fc50e6b2841d710ca137109
diff --git a/core/installer/values-tmpl/virtual-machine.cue b/core/installer/values-tmpl/virtual-machine.cue
index 5b08788..6f311d9 100644
--- a/core/installer/values-tmpl/virtual-machine.cue
+++ b/core/installer/values-tmpl/virtual-machine.cue
@@ -1,9 +1,10 @@
 input: {
 	name: string @name(Hostname)
 	username: string @name(Username)
-	authKey: string @name(Auth Key) @role(VPNAuthKey) @usernameField(username)
+	authKey?: string @name(Auth Key) @role(VPNAuthKey) @usernameField(username) @enabledField(vpnEnabled)
 	cpuCores: int | *1 @name(CPU Cores)
 	memory: string | *"2Gi" @name(Memory)
+	vpnEnabled: bool @name(Enable VPN)
 }
 
 name: "Virutal Machine"
@@ -20,10 +21,15 @@
 			domain: global.domain
 			cpuCores: input.cpuCores
 			memory: input.memory
-			vpn: {
-				enabled: true
-				loginServer: "https://headscale.\(global.domain)"
-				authKey: input.authKey
+			if !input.vpnEnabled {
+				vpn: enabled: false
+			}
+			if input.vpnEnabled {
+				vpn: {
+					enabled: true
+					loginServer: "https://headscale.\(global.domain)"
+					authKey: input.authKey
+				}
 			}
 		}
 	}