diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-08 22:33:36 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-08 22:33:36 -0600 |
| commit | 7b9a5eb561948521ac4669074cc746a0f848ed23 (patch) | |
| tree | e0ef6c7e172bedc3398197c7a1ffabed31b3134a /modules/services/options.nix | |
| parent | 806f697f17214212197f09a8c6aaf6da307e496f (diff) | |
headscale
Diffstat (limited to 'modules/services/options.nix')
| -rw-r--r-- | modules/services/options.nix | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/modules/services/options.nix b/modules/services/options.nix index f42dd12..2084c45 100644 --- a/modules/services/options.nix +++ b/modules/services/options.nix @@ -31,8 +31,20 @@ in { default = null; }; }; - tailscale.enable = mkEnableOption "tailscale"; - sshd.enable = mkEnableOption "OpenSSH server"; + tailscale = { + enable = mkEnableOption "tailscale"; + tailnet = mkOption { + type = lib.types.str; + default = "tail7cca06.ts.net"; + }; + }; + sshd = { + enable = mkEnableOption "OpenSSH server"; + bind_host = mkOption { + type = ip_addr; + default = "0.0.0.0"; + }; + }; }; audio = { enable = mkEnableOption "pipewire + wireplumber"; @@ -54,21 +66,17 @@ in { enable = mkEnableOption ""; bind_host = mkOption { type = ip_addr; - default = - if config.collinux.services.networking.tailscale.enable - then "100.69.160.89" - else "0.0.0.0"; + default = "0.0.0.0"; }; port = mkOption { type = lib.types.port; default = default_port; }; - root_url = mkOption { type = lib.types.str; - default = - if config.collinux.services.networking.tailscale.enable - then "https://${service_name}.tail7cca06.ts.net" + default = with config.collinux.services.networking.tailscale; + if enable + then "https://${service_name}.${tailnet}" else null; }; }; @@ -81,6 +89,10 @@ in { service_name = "forgejo"; default_port = 8010; }; + headscale = selfhostOptions { + service_name = "headscale"; + default_port = 8080; + }; caddy = { enable = mkEnableOption "caddy https server"; envFile = mkOption { |
