| cfg = config.chimera.networking.tailscale; |
| options.chimera.networking.tailscale = { |
| description = "Enable tailscale for this system"; |
| runExitNode.enable = lib.mkEnableOption "Enable this system as an exit node on the tailnet"; |
| description = "Set where your control plane server is"; |
| default = "https://clicks.domains"; |
| example = "https://controlplane.tailscale.com"; |
| authKeyFile = lib.mkOption { |
| type = lib.types.nullOr lib.types.str; |
| description = "Path to key file for tailscale"; |
| config = lib.mkIf cfg.enable { |
| useRoutingFeatures = if cfg.runExitNode.enable then "both" else "client"; |
| "--login-server=${cfg.server}" |
| if cfg.runExitNode.enable then |
| authKeyFile = lib.mkIf (cfg.authKeyFile != null) cfg.authKeyFile; |
| systemd.services.tailscaled.environment.TS_NO_LOGS_NO_SUPPORT = lib.mkIf ( |
| cfg.server != "https://controlplane.tailscale.com" |