Welcome: Remove headscale-user installation

Auto user sync logic takes care of creating headscale internal users.

Change-Id: I25ca82a5e327c8e7666ce27cfd5f810690641a5e
diff --git a/core/installer/app_repository.go b/core/installer/app_repository.go
index 4ce7c9d..0de0c5a 100644
--- a/core/installer/app_repository.go
+++ b/core/installer/app_repository.go
@@ -46,7 +46,6 @@
 	"values-tmpl/certificate-issuer-public.cue",
 	"values-tmpl/appmanager.cue",
 	"values-tmpl/core-auth.cue",
-	"values-tmpl/headscale-user.cue",
 	"values-tmpl/metallb-ipaddresspool.cue",
 	"values-tmpl/private-network.cue",
 	"values-tmpl/welcome.cue",
diff --git a/core/installer/values-tmpl/headscale-user.cue b/core/installer/values-tmpl/headscale-user.cue
deleted file mode 100644
index 9062219..0000000
--- a/core/installer/values-tmpl/headscale-user.cue
+++ /dev/null
@@ -1,32 +0,0 @@
-input: {
-	username: string
-	preAuthKey: {
-		enabled: bool | *false
-	}
-}
-
-name: "headscale-user"
-namespace: "app-headscale"
-
-charts: {
-	headscaleUser: {
-		kind: "GitRepository"
-		address: "https://code.v1.dodo.cloud/helm-charts"
-		branch: "main"
-		path: "charts/headscale-user"
-	}
-}
-
-helm: {
-	"headscale-user-\(input.username)": {
-		chart: charts.headscaleUser
-		values: {
-			username: input.username
-			headscaleApiAddress: "http://headscale-api.\(global.namespacePrefix)app-headscale.svc.cluster.local"
-			preAuthKey: {
-				enabled: input.preAuthKey.enabled
-				secretName: "\(input.username)-headscale-preauthkey"
-			}
-		}
-	}
-}
diff --git a/core/installer/welcome/welcome.go b/core/installer/welcome/welcome.go
index 08a8a1f..b6436c7 100644
--- a/core/installer/welcome/welcome.go
+++ b/core/installer/welcome/welcome.go
@@ -212,39 +212,6 @@
 		http.Error(w, err.Error(), http.StatusInternalServerError)
 		return
 	}
-	// TODO(gio): remove this once auto user sync is implemented
-	{
-		appManager, err := installer.NewAppManager(s.repo, s.nsCreator, nil, s.hf, nil, "/apps")
-		if err != nil {
-			http.Error(w, err.Error(), http.StatusInternalServerError)
-			return
-		}
-		env, err := appManager.Config()
-		if err != nil {
-			http.Error(w, err.Error(), http.StatusInternalServerError)
-			return
-		}
-		appsRepo := installer.NewInMemoryAppRepository(installer.CreateAllApps())
-		{
-			app, err := installer.FindEnvApp(appsRepo, "headscale-user")
-			if err != nil {
-				http.Error(w, err.Error(), http.StatusInternalServerError)
-				return
-			}
-			instanceId := fmt.Sprintf("%s-%s", app.Slug(), req.Username)
-			appDir := fmt.Sprintf("/apps/%s", instanceId)
-			namespace := fmt.Sprintf("%s%s", env.NamespacePrefix, app.Namespace())
-			if _, err := appManager.Install(app, instanceId, appDir, namespace, map[string]any{
-				"username": req.Username,
-				"preAuthKey": map[string]any{
-					"enabled": false,
-				},
-			}); err != nil {
-				http.Error(w, err.Error(), http.StatusInternalServerError)
-				return
-			}
-		}
-	}
 	renderRegistrationSuccess(w, s.loginAddr)
 }