From d2df21ac8bd17d1854f915d9078578d2bce33f54 Mon Sep 17 00:00:00 2001
From: Thanos Apollo <public@thanosapollo.org>
Date: Fri, 31 May 2024 16:51:00 +0300
Subject: guix:(services) remove custom tailscale

---
 guix/services/tailscale.scm | 66 ---------------------------------------------
 1 file changed, 66 deletions(-)
 delete mode 100644 guix/services/tailscale.scm

diff --git a/guix/services/tailscale.scm b/guix/services/tailscale.scm
deleted file mode 100644
index 0632a41..0000000
--- a/guix/services/tailscale.scm
+++ /dev/null
@@ -1,66 +0,0 @@
-;; Under construction
-
-(define-module (services tailscale)
-	       #:use-module (gnu services)
-	       #:use-module (gnu services shepherd)
-	       #:use-module (gnu services configuration)
-	       #:use-module (guix records)
-	       #:use-module (guix gexp)
-	       #:use-module (ice-9 match)
-	       #:use-module (packages tailscale)
-	       #:use-module (gnu packages linux)
-	       #:export (tailscaled-service-type tailscaled-configuration))
-
-;; TODO: https://tailscale.com/kb/1188/linux-dns/#dhcp-dhclient-overwriting-etcresolvconf
-
-(define-record-type* <tailscaled-configuration>
-		     tailscaled-configuration make-tailscaled-configuration
-		     tailscaled-configuration?
-		     (tailscale tailscaled-configuration-tailscale
-				(default tailscale))
-		     (listen-port tailscaled-configuration-listen-port
-			   (default "41641"))
-		     (state-file tailscaled-configuration-state-file
-				 (default "tailscaled.state")))
-
-(define (tailscaled-activation config)
-  "Run tailscaled --cleanup"
-  #~(begin
-      (system* #$(file-append tailscale "/usr/bin/tailscaled") "--cleanup")))
-
-(define (tailscaled-shepherd-service config)
-  "Return a <shepherd-service> for Tailscaled with CONFIG"
-  (let ((tailscale
-	   (tailscaled-configuration-tailscale config))
-	(listen-port
-	   (tailscaled-configuration-listen-port config))
-	(state-file
-	   (tailscaled-configuration-state-file config))
-	(environment #~(list (string-append
-			       "PATH=" ; iptables is required for tailscale to work
-			       (string-append #$iptables "/sbin")
-			       ":"
-			       (string-append #$iptables "/bin")))))
-      (list
-	(shepherd-service
-         (provision '(tailscaled))
-	 (requirement '(networking)) ;; services this depends on
-         (start #~(make-forkexec-constructor
-		    (list #$(file-append tailscale "/usr/bin/tailscaled")
- 		     "-state" #$state-file
-		     ;"-port" #$listen-port
-		     "-verbose" "10")
-		    #:environment-variables #$environment
-		    #:log-file "/var/log/tailscaled.log"))
-         (stop #~(make-kill-destructor))))))
-
-(define tailscaled-service-type
-  (service-type
-    (name 'tailscaled)
-    (extensions
-      (list (service-extension shepherd-root-service-type
-			       tailscaled-shepherd-service)
-            (service-extension activation-service-type
-			       tailscaled-activation)))
-    (default-value (tailscaled-configuration))
-    (description "Launch tailscaled.")))
-- 
cgit v1.2.3