aboutsummaryrefslogtreecommitdiffstats
path: root/install.scm
diff options
context:
space:
mode:
Diffstat (limited to 'install.scm')
-rwxr-xr-xinstall.scm28
1 files changed, 20 insertions, 8 deletions
diff --git a/install.scm b/install.scm
index fe0dc2d..acabf6e 100755
--- a/install.scm
+++ b/install.scm
@@ -4,6 +4,7 @@
(use-modules
(ice-9 and-let-star)
+ (ice-9 format)
(ice-9 ftw)
(ice-9 match)
(ice-9 popen)
@@ -20,9 +21,10 @@
((_ value f rest ...) (->> (f value) rest ...))))
(define (ansi-color-log-formatter lvl time str)
- (let ((color (cond ((eq? lvl 'CRITICAL) 'RED)
- ((eq? lvl 'WARN) 'YELLOW)
- ((eq? lvl 'OK) 'GREEN))))
+ (let ((color (case lvl
+ ((CRITICAL) 'RED)
+ ((WARN) 'YELLOW)
+ ((OK) 'GREEN))))
(string-append
(strftime "%F %H:%M:%S" (localtime time))
(colorize-string
@@ -167,21 +169,29 @@
file-name))
(define (format-config-entry item)
- (format #t "[~a]~%" (car item))
- (format #t "~:{~a=~@{~a~^;~}~%~}~%" (cdr item)))
+ (format #t "[~a]~%" (car item))
+ (format #t "~:{~a=~@{~a~^;~}~%~}~%" (cdr item)))
(define (mail-config)
(log-msg 'INFO "Configuring mail")
(log-msg 'INFO " Symlink mbsync")
- (config-links "mail/dot-mbsyncrc.personal" "~/.mbsyncrc" #f)
+ (config-links
+ (if (string=? (gethostname) "obp")
+ "mail/dot-mbsyncrc.byteplant"
+ "mail/dot-mbsyncrc.personal")
+ "~/.mbsyncrc" #f)
(let* ((notmuch-config-file (expand-file "~/.notmuch-config"))
(emails
(list
"hi@oscarnajera.com"
"hello@oscarnajera.com"
"najera.oscar@gmail.com"
+ "oscar@byteplant.com"
))
- (user-mail "hi@oscarnajera.com")
+ (user-mail
+ (if (string=? (gethostname) "obp")
+ "oscar@byteplant.com"
+ "hi@oscarnajera.com"))
;; setting up notmuch config
(config
`((database (path ,(expand-file "~/.mail")))
@@ -203,11 +213,13 @@
(define (main args)
(setup-logging)
(log-msg 'INFO "Symlink PIM")
- (config-links "calendars.conf" "~/.calendars.conf" #f)
(symlink-tree "home-dots" "~/")
(config-links "gnupg/gpg.conf" "~/.gnupg/gpg.conf" #f)
(config-links "gnupg/gpg-agent.conf" "~/.gnupg/gpg-agent.conf" #f)
(symlink-tree "config" "~/.config")
+ (when (string=? (gethostname) "obp")
+ (config-links "other_configs/byte-gitconfig"
+ "~/bytegit/.gitconfig" #f))
(mail-config)
(shutdown-logging))