summary refs log tree commit diff
path: root/nixos/modules/services/networking/tailscale.nix
diff options
context:
space:
mode:
authorDavid Anderson <dave@natulte.net>2020-10-30 18:11:30 -0700
committerDavid Anderson <dave@natulte.net>2020-11-03 19:37:48 -0800
commit503caab7765f31d18bce7fa58b26d447bc413c17 (patch)
treeab82b5823faa99e7c46b3d8871d45fc3d365eb5f /nixos/modules/services/networking/tailscale.nix
parente468d5bfaa936a22e7b69ba298d24a8be5de1d4f (diff)
downloadnixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.tar
nixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.tar.gz
nixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.tar.bz2
nixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.tar.lz
nixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.tar.xz
nixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.tar.zst
nixpkgs-503caab7765f31d18bce7fa58b26d447bc413c17.zip
nixos/tailscale: use upstream systemd service config.
Signed-off-by: David Anderson <dave@natulte.net>
Diffstat (limited to 'nixos/modules/services/networking/tailscale.nix')
-rw-r--r--nixos/modules/services/networking/tailscale.nix26
1 files changed, 3 insertions, 23 deletions
diff --git a/nixos/modules/services/networking/tailscale.nix b/nixos/modules/services/networking/tailscale.nix
index 4419c8a0602..d6684d69e61 100644
--- a/nixos/modules/services/networking/tailscale.nix
+++ b/nixos/modules/services/networking/tailscale.nix
@@ -18,30 +18,10 @@ in {
 
   config = mkIf cfg.enable {
     environment.systemPackages = [ pkgs.tailscale ]; # for the CLI
-    systemd.services.tailscale = {
-      description = "Tailscale client daemon";
-
-      after = [ "network-pre.target" ];
-      wants = [ "network-pre.target" ];
+    systemd.packages = [ pkgs.tailscale ];
+    systemd.services.tailscaled = {
       wantedBy = [ "multi-user.target" ];
-
-      startLimitIntervalSec = 0;
-
-      serviceConfig = {
-        ExecStart =
-          "${pkgs.tailscale}/bin/tailscaled --port ${toString cfg.port}";
-
-        RuntimeDirectory = "tailscale";
-        RuntimeDirectoryMode = 755;
-
-        StateDirectory = "tailscale";
-        StateDirectoryMode = 750;
-
-        CacheDirectory = "tailscale";
-        CacheDirectoryMode = 750;
-
-        Restart = "on-failure";
-      };
+      serviceConfig.Environment = "PORT=${toString cfg.port}";
     };
   };
 }