about summary refs log tree commit diff
path: root/ops/nixos/modules/tailscale.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-04-04T12·02+0100
committerVincent Ambo <tazjin@google.com>2020-04-04T12·02+0100
commit0f3d11f541841e903cf656bf84e841f14db345e4 (patch)
tree21be9dd5f319a184146d8fc259c7523cbd51f6e8 /ops/nixos/modules/tailscale.nix
parenta0cb4703e8b1c4f00f18257046a21ac809ca4c88 (diff)
chore(third_party): Remove Tailscale derivation r/621
This is now part of nixpkgs itself.
Diffstat (limited to 'ops/nixos/modules/tailscale.nix')
-rw-r--r--ops/nixos/modules/tailscale.nix77
1 files changed, 0 insertions, 77 deletions
diff --git a/ops/nixos/modules/tailscale.nix b/ops/nixos/modules/tailscale.nix
deleted file mode 100644
index 8f08ec95bdfc..000000000000
--- a/ops/nixos/modules/tailscale.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-# NixOS module for Tailscale
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let
-  cfg = config.services.tailscale;
-
-  aclVar = optionalAttrs (cfg.aclFile != null) {
-    ACL_FILE = "--acl-file=${cfg.aclFile}";
-  };
-
-in {
-  options.services.tailscale = {
-    enable = mkEnableOption "Tailscale relay";
-
-    package = mkOption {
-      type = types.package;
-      default = pkgs.tailscale; # <- this doesn't actually exist yet
-      description = "Tailscale client package to use";
-    };
-
-    port = mkOption {
-      type = types.int;
-      default = 41641;
-      description = ''
-        Set the port to listen on for incoming VPN packets.
-
-        Remote nodes will automatically be informed about the new port
-        number, but you might want to configure this in order to set
-        external firewall settings.
-      '';
-    };
-
-    aclFile = mkOption {
-      type = with types; nullOr path;
-      default = "${cfg.package}/etc/acl.json";
-    };
-
-    relayConf = mkOption {
-      type = types.path;
-      example = "/etc/tailscale.conf";
-      description = "The path to relay.conf";
-    };
-
-    extraFlags = mkOption {
-      type = with types; listOf str;
-      default = [];
-      description = "Extra flags you might want to pass to relaynode.";
-    };
-  };
-
-  config = mkIf cfg.enable {
-    environment.systemPackages = [ cfg.package ];
-
-    systemd.services.tailscale-relay = {
-      description = "Traffic relay node for Tailscale IPN";
-      after = [ "network.target" ];
-      wantedBy = [ "multi-user.target" ];
-      path = with pkgs; [ iproute iptables ];
-
-      unitConfig.ConditionPathExists = cfg.relayConf;
-
-      script = concatStringsSep " " ([
-        "${cfg.package}/bin/relaynode"
-        "--port=${toString cfg.port}"
-        "--config=${cfg.relayConf}"
-        (optionalString (cfg.aclFile != null) "--acl-file=${cfg.aclFile}")
-      ] ++ cfg.extraFlags);
-
-      serviceConfig = {
-        RuntimeDirectory = "tailscale";
-        LogsDirectory = "tailscale";
-      };
-    };
-  };
-}