aboutsummaryrefslogtreecommitdiffstats
path: root/config/shepherd/init.d/my-daemons.scm
blob: c235bfdb04abb4a201e139df6d055efd2f821b44 (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
(let ((workdir (string-append (getenv "HOME") "/dev/dotfiles/scratch/semgrep/")))
  (register-services
   (list
    (service
     '(habit-logs)
     #:documentation "Habit tracker"
     #: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 - interu pt process stream, ctrl-C
     #:respawn? #t)

    (service
     '(roam-semantic-db)
     #:documentation "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))))