Unverified Commit 0bb6676d authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

nixos/tailscale: Add option to disable upstream debug logging

Tailscale by default sends logs upstream to a centralized logging
service. We can disable this by adding an env var
https://tailscale.com/kb/1011/log-mesh-traffic?tab=linux#opting-out-of-client-logging
parent cda76fb1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -44,6 +44,12 @@ in
      description = "Whether to disable the Taildrop feature for sending files between nodes.";
    };

    disableUpstreamLogging = mkOption {
      default = false;
      type = types.bool;
      description = "Whether to disable Tailscaled from sending debug logging upstream.";
    };

    package = lib.mkPackageOption pkgs "tailscale" { };

    openFirewall = mkOption {
@@ -154,6 +160,9 @@ in
      ])
      ++ (lib.optionals (cfg.disableTaildrop) [
        "TS_DISABLE_TAILDROP=true"
      ])
      ++ (lib.optionals (cfg.disableUpstreamLogging) [
        "TS_NO_LOGS_NO_SUPPORT=true"
      ]);
      # Restart tailscaled with a single `systemctl restart` at the
      # end of activation, rather than a `stop` followed by a later