aboutsummaryrefslogtreecommitdiffstats
path: root/config/shepherd/init.d/my-daemons.scm
blob: 1b5daf896bcd9f48fab39d1a2f03e7819a82c89a (plain)
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
(register-services
 (make <service>
   #:docstring "Habit tracker"
   #:provides '(habit-logs)
   #:start (make-forkexec-constructor
            (list "sbcl"
                  "--load"
                  (string-append (getenv "HOME") "/dev/common-lisp/todo-demo/habit.asd")
                  "--eval" "(asdf:load-system :habit)"
                  "--eval" "(habit-log::main)"
                  "--non-interactive")
            #:directory (string-append (getenv "HOME") "/dev/common-lisp/todo-demo/")
            #:environment-variables (list (string-append "HABIT_DIR=" (getenv "HOME") "/org/habits/")
                                          "PORT=4242")
            #:log-file "/tmp/habits.log")
   #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
   #:respawn? #t))

(let ((workdir (string-append (getenv "HOME") "/dev/dotfiles/scratch/semgrep/")))
  (register-services
   (make <service>
     #:docstring "Roam semantic DB"
     #:provides '(roam-semantic-db)
     #:start (make-forkexec-constructor
              (list "python"
                    (string-append workdir "server.py"))
              #:directory workdir
              #:environment-variables (list (string-append "PATH=" (getenv "HOME") "/.virtualenvs/language/bin"))
              #:log-file "/tmp/roam-semantic.log")
     #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
     #:respawn? #t)))