From 86ecc2a234a9f44331b1f88c15656335af313fe5 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Wed, 20 Oct 2021 00:17:08 +0200 Subject: [PATCH] Switch to YAML config --- config.json.postgres.example | 30 ------------------------------ config.json.sqlite.example | 26 -------------------------- config.yaml.example | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 56 deletions(-) delete mode 100644 config.json.postgres.example delete mode 100644 config.json.sqlite.example create mode 100644 config.yaml.example diff --git a/config.json.postgres.example b/config.json.postgres.example deleted file mode 100644 index 9b6f737..0000000 --- a/config.json.postgres.example +++ /dev/null @@ -1,30 +0,0 @@ -{ - "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", - "db_type": "postgres", - "db_host": "localhost", - "db_port": 5432, - "db_name": "headscale", - "db_user": "foo", - "db_pass": "bar", - "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" - } -} diff --git a/config.json.sqlite.example b/config.json.sqlite.example deleted file mode 100644 index 74e1590..0000000 --- a/config.json.sqlite.example +++ /dev/null @@ -1,26 +0,0 @@ -{ - "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", - "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" - } -} diff --git a/config.yaml.example b/config.yaml.example new file mode 100644 index 0000000..6a08908 --- /dev/null +++ b/config.yaml.example @@ -0,0 +1,34 @@ +--- +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 + +# Postgres config +db_type: postgres +db_host: localhost +db_port: 5432 +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: '' +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