Hi! I'm testing Guix on my NixOS through guix home environment. Recently, I replaced my systemd user manager with GNU Shepherd, and it seems to work fine (e.g. I could launch emacs as shepherd service).
I'm wondering how would one go about integrating shepherd with 'guix home' configuration (i.e. home environment services), akin to what Guix does (I believe, without needing to do 'guix home ...'). Following is my init.scm to play nice with systemd: ========================================================================================== ;; init.scm -- default shepherd configuration file. (use-modules (shepherd service) (scheme base); #:select (open-output-bytevector get-output-bytevector) (rnrs io ports) ((ice-9 ftw) #:select (scandir))) (define (string->bytevector sz) (let ((out (open-output-bytevector))) (display sz out) (get-output-bytevector out))) (define (sd-notify status) (let ((sd-notify-socket-path (getenv "NOTIFY_SOCKET"))) (when (string? sd-notify-socket-path) (let ((sock (socket AF_UNIX SOCK_DGRAM PF_UNIX)) (buf (string->bytevector status))) (connect sock AF_UNIX sd-notify-socket-path) (send sock buf 0) (close sock))))) (sd-notify "READY=1\nSTATUS=Shepherd is ready for its herd.\n") ;; Services known to shepherd: ;; Add new services (defined using 'service') to shepherd here by ;; providing them as arguments to 'register-services'. (register-services) ;; Send shepherd into the background ;(perform-service-action root-service 'daemonize) ;; Services to start when shepherd starts: ;; Add the name of each service that should be started to the list ;; below passed to 'for-each'. ;(for-each start '()) (for-each (lambda (file) (load (string-append "init.d/" file))) (scandir (string-append (dirname (current-filename)) "/init.d") (lambda (file) (string-suffix? ".scm" file)))) ;; Local Variables: ;; mode: scheme ;; tab-width: 2 ;; End: ========================================================================================== Essentially, what should I put in $XDG_CONFIG_HOME/shepherd/init.d/ for it to execute my "guix home" configuration. Thanks in advance for any hints -- Abbé