From 70a99b8c096fa2b8a23b8ec0d47b625a2f94df62 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sat, 20 May 2023 16:22:53 +0200 Subject: Simplify auto-localtime script a bit --- tw/system/lap.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tw/system/lap.scm') 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 -- cgit v1.2.3