[frork] updates
change tylnzonxuytqzktoqnkyqtpsoxstuums
commit 9b798130495450f69f5a5f4cdefe8aadcd786573
author Alpha Chen <alpha@kejadlen.dev>
date
parent spzxlqkk
diff --git a/frork/_dotfiles.fnl b/frork/_dotfiles.fnl
index 51a4be3c..d166f825 100644
--- a/frork/_dotfiles.fnl
+++ b/frork/_dotfiles.fnl
@@ -1,5 +1,7 @@
 (local {: ok :utils {: dirname}} (require :flork))
 
+(ok :git "~/.dotfiles" "https://git.kejadlen.dev/alpha/dotfiles.git")
+
 (let [dotfiles [:.config
                 :.digrc
                 :.gemrc
@@ -18,8 +20,10 @@
   (each [_ v (ipairs dotfiles)]
     (let [src (.. :$HOME/.dotfiles/ v)
           dest (.. :$HOME/ v)]
+      ;; TODO fix this - it doesn't work
       (when (v:match "/")
         (-?> dest dirname (partial #(ok :directory))))
       (ok :symlink dest src))))
 
+;; for per-system configuration
 (ok :directory :$HOME/.config/jj/conf.d)
diff --git a/frork/_macos.fnl b/frork/_macos.fnl
index cbb26cd1..0d9de5a7 100644
--- a/frork/_macos.fnl
+++ b/frork/_macos.fnl
@@ -14,7 +14,11 @@
   (ok :directory (dirname mailmate-keybindings))
   (ok :symlink mailmate-keybindings "~/.dotfiles/macos/MailMate.plist"))
 
+;; this is slow - maybe replace with a hand-rolled assertion type?
+(ok :brew-bundle "~/.dotfiles/Brewfile")
+
 (register :dock {:status (fn []
+                           ;; TODO install instead of asserting
                            (assert-bin :dockutil)
                            (let [out (sh! :dockutil :--list)
                                  items (icollect [line (out:gmatch "[^\n]+")]
diff --git a/frork/main.fnl b/frork/main.fnl
index 9cfe1d8a..77804075 100644
--- a/frork/main.fnl
+++ b/frork/main.fnl
@@ -3,17 +3,14 @@
 
 (require :types)
 
+;; some basics
 (ok :directory "~/src")
 
-(ok :git "~/.dotfiles" "https://git.kejadlen.dev/alpha/dotfiles.git")
-
+;; dotfiles
 (require :_dotfiles)
 
 (if (= platform :darwin) (require :_macos))
 
-;; this is slow...
-(ok :brew-bundle "~/.dotfiles/Brewfile")
-
 ;; https://tratt.net/laurie/blog/2024/faster_shell_startup_with_shell_switching.html
 (do
   (assert-bin :dscl) ; TODO Linux
@@ -22,10 +19,11 @@
         actual-shell (chomp (out:match "UserShell: (.+)"))]
     (if (not= actual-shell desired-shell) (sh! :chsh :-s desired-shell))))
 
-;; TODO figure out when these actually need to be run instead of always doing these
+;; TODO figure out when these should be run - surely not necessary every single time
 (sh! :bat :cache :--build)
 (sh! :brew :services :restart :felixkratz/formulae/sketchybar)
 
 ;; TODO
 ;; - install neovim plugins
 ;; - install tmux plugins
+;; - install numderline
diff --git a/frork/types.fnl b/frork/types.fnl
index fb16e00a..ff20349f 100644
--- a/frork/types.fnl
+++ b/frork/types.fnl
@@ -39,6 +39,6 @@
                                                 :actual (normalize-value current-type
                                                                          current-value)})
                                        :ok)))
-                       :install #(defaults :write $1 $2 (.. "-" $3) $4)
-                       :upgrade #(defaults :write $1 $2 (.. "-" $3) $4)
+                       :install #(defaults :write $1 $2 (.. "-" $3) (tostring $4))
+                       :upgrade #(defaults :write $1 $2 (.. "-" $3) (tostring $4))
                        :remove #(defaults :delete $1 $2)}))