help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guix home mcron help


From: Trev
Subject: Guix home mcron help
Date: Thu, 23 Jun 2022 09:42:29 -0700

Hey guys,

I am trying to appreciate how to set up a guix home mcron using a
separate module that I wrote that exports the job.

My config lives in ~/.config/guix/home/config.scm

My cron module lives in ~/.config/guix/home/cron/mailsync.scm

The mailsync module export this:

#+BEGIN_SRC scheme
(define-public %mailsync-job
  #~(job '(next-minute-from
           (next-minute) (range 0 60 15))
         (lambda ()
           (mailsync-update %mailsync-default-terms)
           (mailsync-notify
            (mailsync-count-new-messages)))
         "mbsync-nm-job"))
#+END_SRC

In my home config I am using it like this:

#+BEGIN_SRC scheme
(home-environment
 (packages
  (specifications->packages
   (append %base-packages
           %emacs
           %multimedia
           %browsers
           %chat-clients
           %devel)))
 (services
  (list (service home-mcron-service-type
                 (home-mcron-configuration
                  (jobs (list %mailsync-job)))))))
#+END_SRC

The command =guix home reconfigure ~/.config/guix/home/config.scm= passes 
without errors but the resulting cron is unhappy when it runs because it has 
lost scope of the module it came from and can't find =mailsync-update= (or any 
other definitions from within said module).

I have attempted to implement =with-imported-modules= from within the module 
and from within my home configuration and am not having much success.

Can I get a push?

Here's a link to the config and module in full: 
https://gist.github.com/trev-dev/3312444daa75758822c06db5922aac4f

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]