diff options
author | Timo Wilken | 2023-05-20 16:22:53 +0200 |
---|---|---|
committer | Timo Wilken | 2023-05-20 16:22:53 +0200 |
commit | 70a99b8c096fa2b8a23b8ec0d47b625a2f94df62 (patch) | |
tree | 442de9f00023d8d814018b213912cc75176548f5 /tw/system | |
parent | 8d654d059f0b85b5d2eb3aa92cf2a6ec689b56c6 (diff) |
Simplify auto-localtime script a bit
Diffstat (limited to 'tw/system')
-rw-r--r-- | tw/system/lap.scm | 9 |
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 |