diff --git a/cmd/headscale/headscale_test.go b/cmd/headscale/headscale_test.go index bddea94c..0c3add69 100644 --- a/cmd/headscale/headscale_test.go +++ b/cmd/headscale/headscale_test.go @@ -41,7 +41,7 @@ func (*Suite) TestPostgresConfigLoading(c *check.C) { } // Symlink the example config file - err = os.Symlink(filepath.Clean(path+"/../../config.json.postgres.example"), filepath.Join(tmpDir, "config.json")) + err = os.Symlink(filepath.Clean(path+"/../../config.yaml.postgres.example"), filepath.Join(tmpDir, "config.yaml")) if err != nil { c.Fatal(err) } @@ -74,7 +74,7 @@ func (*Suite) TestSqliteConfigLoading(c *check.C) { } // Symlink the example config file - err = os.Symlink(filepath.Clean(path+"/../../config.json.sqlite.example"), filepath.Join(tmpDir, "config.json")) + err = os.Symlink(filepath.Clean(path+"/../../config.yaml.sqlite.example"), filepath.Join(tmpDir, "config.yaml")) if err != nil { c.Fatal(err) } @@ -108,7 +108,7 @@ func (*Suite) TestDNSConfigLoading(c *check.C) { } // Symlink the example config file - err = os.Symlink(filepath.Clean(path+"/../../config.json.sqlite.example"), filepath.Join(tmpDir, "config.json")) + err = os.Symlink(filepath.Clean(path+"/../../config.yaml.sqlite.example"), filepath.Join(tmpDir, "config.yaml")) if err != nil { c.Fatal(err) } diff --git a/config.yaml.example b/config.yaml.postgres.example similarity index 86% rename from config.yaml.example rename to config.yaml.postgres.example index 6a089085..569b42a9 100644 --- a/config.yaml.example +++ b/config.yaml.postgres.example @@ -13,10 +13,6 @@ db_name: headscale db_user: foo db_pass: bar -# SQLite config (uncomment it if you want to use SQLite) -# db_type: sqlite3 -# db_path: db.sqlite - acme_url: https://acme-v02.api.letsencrypt.org/directory acme_email: '' tls_letsencrypt_hostname: '' diff --git a/config.yaml.sqlite.example b/config.yaml.sqlite.example new file mode 100644 index 00000000..158b1e5b --- /dev/null +++ b/config.yaml.sqlite.example @@ -0,0 +1,26 @@ +--- +server_url: http://127.0.0.1:8080 +listen_addr: 0.0.0.0:8080 +private_key_path: private.key +derp_map_path: derp.yaml +ephemeral_node_inactivity_timeout: 30m + +# SQLite config (uncomment it if you want to use SQLite) +db_type: sqlite3 +db_path: db.sqlite + +acme_url: https://acme-v02.api.letsencrypt.org/directory +acme_email: '' +tls_letsencrypt_hostname: '' +tls_letsencrypt_listen: ":http" +tls_letsencrypt_cache_dir: ".cache" +tls_letsencrypt_challenge_type: HTTP-01 +tls_cert_path: '' +tls_key_path: '' +acl_policy_path: '' +dns_config: + nameservers: + - 1.1.1.1 + domains: [] + magic_dns: true + base_domain: example.com