diff options
Diffstat (limited to 'tw/system.scm')
-rw-r--r-- | tw/system.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tw/system.scm b/tw/system.scm index c9904e24..0b738038 100644 --- a/tw/system.scm +++ b/tw/system.scm @@ -43,6 +43,14 @@ ("vin.twilken.net" . 22022) ("pi3.twilken.net" . 51022))) +(export server-wireguard-address) +(define* (server-wireguard-address host-name #:optional (port "")) + (string-replace-substring + (car ; get the IPv4 address + (wireguard-peer-allowed-ips + (assoc-ref %wireguard-peers host-name))) + "/32" port)) + (define-public (server-base-services host-name) (cons* ;; SSH login, allowing access only for me. To give more public keys @@ -61,11 +69,7 @@ (service prometheus-node-exporter-service-type (prometheus-node-exporter-configuration (web-listen-address - (string-replace-substring - (car ; get the IPv4 address - (wireguard-peer-allowed-ips - (assoc-ref %wireguard-peers host-name))) - "/32" ":9100")))) + (server-wireguard-address host-name ":9100")))) (simple-service 'disk-maintenance mcron-service-type (list #~(job "0 2 * * *" "guix gc -d 2w") |