summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-05-31 16:51:00 +0300
committerThanos Apollo <[email protected]>2024-05-31 16:51:00 +0300
commitd2df21ac8bd17d1854f915d9078578d2bce33f54 (patch)
tree1a3c87cb42d56d939ccfffa79c0d663a9396721a /guix
parent3c56211892b31a06be00d6847cc7c55909a91113 (diff)
guix:(services) remove custom tailscale
Diffstat (limited to 'guix')
-rw-r--r--guix/services/tailscale.scm66
1 files changed, 0 insertions, 66 deletions
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.")))