1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  | 
diff --git a/cmd/ugitd/args.go b/cmd/ugitd/args.go
index 32f682cb7eea8595baac966014d69e5b9c36863d..865deecb7c64f8b59fd2c17a601c5d9cc2ea466b 100644
--- a/cmd/ugitd/args.go
+++ b/cmd/ugitd/args.go
@@ -11,12 +11,13 @@ 	"github.com/peterbourgon/ff/v3/ffyaml"
 )
 
 type cliArgs struct {
-	RepoDir string
-	SSH     sshArgs
-	HTTP    httpArgs
-	Meta    metaArgs
-	Profile profileArgs
-	Log     logArgs
+	RepoDir   string
+	SSH       sshArgs
+	HTTP      httpArgs
+	Meta      metaArgs
+	Profile   profileArgs
+	Log       logArgs
+	Tailscale tailscaleArgs
 }
 
 type sshArgs struct {
@@ -50,6 +51,11 @@
 type logArgs struct {
 	Level log.Level
 	JSON  bool
+}
+
+type tailscaleArgs struct {
+	Hostname string
+	DataDir  string
 }
 
 func parseArgs(args []string) (c cliArgs, e error) {
@@ -75,6 +81,10 @@ 		},
 		Log: logArgs{
 			Level: log.InfoLevel,
 		},
+		Tailscale: tailscaleArgs{
+			Hostname: "ugit",
+			DataDir:  ".tsnet",
+		},
 	}
 
 	fs.Func("log.level", "Logging level", func(s string) error {
@@ -108,6 +118,8 @@ 			URL:  parts[1],
 		})
 		return nil
 	})
+	fs.StringVar(&c.Tailscale.Hostname, "tailscale.hostname", c.Tailscale.Hostname, "Tailscale host to show private repos on")
+	fs.StringVar(&c.Tailscale.DataDir, "tailscale.data-dir", c.Tailscale.DataDir, "Tailscale data/state directory")
 
 	return c, ff.Parse(fs, args,
 		ff.WithEnvVarPrefix("UGIT"),
  |