summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2023-05-20 16:22:53 +0200
committerTimo Wilken2023-05-20 16:22:53 +0200
commit70a99b8c096fa2b8a23b8ec0d47b625a2f94df62 (patch)
tree442de9f00023d8d814018b213912cc75176548f5
parent8d654d059f0b85b5d2eb3aa92cf2a6ec689b56c6 (diff)
Simplify auto-localtime script a bit
-rw-r--r--tw/system/lap.scm9
1 files changed, 4 insertions, 5 deletions
diff --git a/tw/system/lap.scm b/tw/system/lap.scm
index 307cf590..1bc722d4 100644
--- a/tw/system/lap.scm
+++ b/tw/system/lap.scm
@@ -109,7 +109,6 @@ EndSection
(web client)
(web response))
(define tz-api-url "https://ipapi.co/timezone")
- (define /etc/localtime "/etc/localtime")
;; According to the Arch Wiki, when checking for "up" as the second
;; argument, VPN connections could cause undesired timezone changes.
(when (and (string=? "connectivity-change" (caddr (command-line)))
@@ -118,10 +117,10 @@ EndSection
(unless (= 200 (response-code response))
(error "Got error response to request:" response))
(let ((zonefile (string-append #$tzdata "/share/zoneinfo/" timezone)))
- (delete-file /etc/localtime)
- (symlink zonefile /etc/localtime)
- (format (current-error-port)
- "Successfully updated timezone to ~a" timezone)))))))
+ (delete-file "/etc/localtime")
+ (symlink zonefile "/etc/localtime"))
+ (format (current-error-port)
+ "Successfully updated timezone to ~a~%" timezone))))))
;; TODO: Nouveau claims (in dmesg) that I have a NVIDIA GM204. Maybe
;; only use (select-firmware "^nvidia/gm204/"). linux-firmware only