Hello!
I am wondering if it possible for Shepherd to load services using a guix
package.
`herd load root </absolute/path/to/service-with-guix-package.scm>`
I tried variations on
```
(define-module (testd)
#:use-module (guix gexp)
#:use-module (shepherd service)
#:use-module (gnu packages ssh))
(define testd
(service
'(sshd ssh-daemon) ;multiple names
#:start (make-forkexec-constructor
(list (file-append openssh "/sbin/sshd") "-D")
#:pid-file "/tmp/sshd.pid")
#:stop (make-kill-destructor)
#:respawn? #t))
(register-services (list testd))
```
but I never manage to start the sshd service.
I get errors (after loading) like:
> Loading
/mnt/data/engagement/networking/Ouroboros/tools/ouroboros/.guix/modules/ouroboros/testd.scm.
> herd: error: exception caught while executing 'load' on service 'root':
> no code for module (gcrypt hash)
It probably has to do with things not being in the correct load path,
but I'm unsure how to approach this...
This is just a test service, but the idea is to use a guix package
defined by a local guix.scm file.
Whenever I have some changes I want to test with the daemon I'm working
on, I would load the file and
replace (restart) the running service by the new service, directly
compiled from the local tree by the guix.scm recipe.
The failing test files can be found on:
https://codeberg.org/th1j5/ouroboros/src/branch/guix-service
under .guix/modules/ouroboros
Thanks for any pointers!
Thijs