# home.scm -rw-r--r-- 1.4 KiB View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(define (normalize-filesystem-pair pair)
  (match pair
    ((input . output)
     (list output (if (string? input)
                    (config-file input)
                    input)))
     (output (list output (config-file (basename output))))))

(define %neovim-config
  (let ((code (call-with-input-file (path-join %conf-dir "nvim.fnl")
                (lambda (file)
                  (get-string-all file)))))
    (computed-file "nvim.lua"
      #~(begin
         (use-modules (ice-9 popen)
                      (ice-9 textual-ports))
         (let ((pipe (open-input-output-pipe
                      (string-append #$(file-append fennel "/bin/fennel")
                                     " --compile -"))))
           (display #$code pipe)
           (let ((output (get-string-all pipe)))
             (close-pipe pipe)
             output))))))

(define %config-files
  (map normalize-filesystem-pair
       `("aerc/aerc.conf"
         ("aerc-binds.conf" . "aerc/binds.conf")
         "fish/conf.d/hashrepo.fish"
         "fish/conf.d/vi-bindings.fish"
         "fish/conf.d/zoxide.fish"
         "fish/conf.d/colourscheme.fish"
         "fish/conf.d/prompt.fish"
         "foot/foot.ini"
         "guix/channels.scm"
         (,%neovim-config . "nvim/init.lua")
         "senpai/senpai.scfg"
         ("sway.conf" . "sway/config")
         ("waybar.json" . "waybar/config")
         ("waybar.css" . "waybar/style.css"))))