all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* mcron
@ 2018-08-04  5:33 Benjamin Slade
  2018-08-04  8:44 ` mcron Pierre Neidhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Slade @ 2018-08-04  5:33 UTC (permalink / raw)
  To: help-guix

nnI'm having trouble getting mcron to work. I have configured it in
/etc/config.scm similarly to the example given in the manual, but it the
mcron service seems to immediately stop. I've tried `sudo herd enable
mcron` and `sudo herd start mcron`, which work, but then when I check
its status, I find mcron is disabled and not running.

My /etc/config.scm looks like this:

`````
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.

(use-modules (gnu) (gnu services ssh) (gnu services mcron) (gnu system nss) (gnu packages lisp) (gnu packages wm) (gnu packages linux)
	(gnu packages guile) (gnu packages backup))
(use-service-modules desktop networking)
(use-package-modules certs gnome wm base idutils xorg)

(define updatedb-job
  ;; Run 'updatedb' at 3AM every day.  Here we write the
  ;; job's action as a Scheme procedure.
  #~(job '(next-hour '(3))
         (lambda ()
           (execl (string-append #$findutils "/bin/updatedb")
                  "updatedb"
                  "--prunepaths=/tmp /var/tmp /gnu/store"))))

(define garbage-collector-job
  ;; Collect garbage 5 minutes after midnight every day.
  ;; The job's action is a shell command.
  #~(job "5 0 * * *"            ;Vixie cron syntax
         "guix gc -F 1G"))

(define idutils-job
  ;; Update the index database as user "charlie" at 12:15PM
  ;; and 19:15PM.  This runs from the user's home directory.
  #~(job '(next-minute-from (next-hour '(12 19)) '(15))
         (string-append #$idutils "/bin/mkid src")
         #:user "emacsomancer"))

(define mbsync-mail-fetch-emacsomancer
  ;; fetch mail via isync/mbsync for mu/mu4e every 10 minutes
  #~(job "5/* * * * *"          ;Vixie cron syntax
	 "/home/emacsomancer/.guix-profile/bin/mbsync -a"
	 #:user "emacsomancer"))

(define test-emacsomancer
  ;; fetch mail via isync/mbsync for mu/mu4e every 10 minutes
  #~(job "1/* * * * *"          ;Vixie cron syntax
	 "/home/emacsomancer/.guix-profile/bin/touch /home/emacsomancer/hello"
	 #:user "emacsomancer"))


(operating-system
  (host-name "guixy")
  (timezone "US/Mountain")
  (locale "en_GB.utf8")

  ;; Use the UEFI variant of GRUB with the EFI System
  ;; Partition mounted on /boot/efi.
  ;; -> actually using BIOS because guixsd 0.15 live usb didn't probe efi 
;  (bootloader (grub-configuration (device "/dev/sda")))
  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")))

  ;; Specify a mapped device for the encrypted root partition.
  ;; The UUID is that returned by 'cryptsetup luksUUID'.
  (mapped-devices
   (list (mapped-device
          (source (uuid "e33cc543-9aa9-467a-a9e8-96e1f092b866"))
          (target "guiksdelux")
          (type luks-device-mapping))
	 ;; (mapped-device
         ;;  (source (uuid "7c97b263-4adc-b4e9-a1d7-9d3de8eb9694"))
         ;;  (target "guix-home")
         ;;  (type luks-device-mapping))
	  ))

  (file-systems (cons* (file-system
		       (device (uuid "18c93271-4fcd-484b-ac1a-f4670b6d2b7c" 'ext4))
		       (mount-point "/")
		       (type "ext4"))
		      (file-system
                        (device "/dev/mapper/guiksdelux")
                        (mount-point "/home")
                        (type "ext4")
                        (dependencies mapped-devices))
;		      (file-system
;                        (device "/dev/mapper/guix-home")
;                        (mount-point "/home")
;                        (type "ext4")
;                        (dependencies mapped-devices))
;                      (file-system
;                         (device (uuid "35ee1733-b91f-4bbc-3bdc-86b5bd25489f" 'ext2))
;                         (mount-point "/boot")
;                         (type "ext2"))
;                       (file-system
;                         (device (uuid "F1D1-FC28" 'fat))
;                         (mount-point "/boot/efi")
;                         (type "vfat"))
                       %base-file-systems))

  (users (cons (user-account
                (name "emacsomancer")
;                (comment "")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/emacsomancer"))
               %base-user-accounts))

  ;; Add GNOME and/or Xfce---we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with
  ;; NetworkManager, and more.
  (packages (cons* sbcl-stumpwm  ;common lisp window manager
		   ; awesome     ;lua window manager
		   nss-certs          ;for HTTPS access
                   gvfs              ;for user mounts
		   xset             ; no beeps &c.
		   tlp                ; NEED TO SET UP
		   acpi                  ; battery (still not accessible?)
		   thinkfan             ; controlling ThinkPad fans
		   borg			; python-based backup
;		   libchop            ; guile-based backup (chop-backup)   ---- NOT WORKING
		   network-manager         ; probably change to something else
		   network-manager-applet  ; probably change to something else
;		   mcron           ; guile-based cron
                   %base-packages))


  ;; Use the "desktop" services, which include the X11
  ;; log-in service, networking with NetworkManager, and more.
  (services (cons* (mcron-service (list garbage-collector-job
                                       updatedb-job
                                       idutils-job
				       mbsync-mail-fetch-emacsomancer
;				       test-emacsomancer
				       ))
	           (service openssh-service-type)
		   %desktop-services))
  
  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))
````

I'm not sure why I can't get mcron to start.

-- 
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-05  8:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-04  5:33 mcron Benjamin Slade
2018-08-04  8:44 ` mcron Pierre Neidhardt
2018-08-04 21:16   ` mcron Benjamin Slade
2018-08-04 22:02     ` mcron Pierre Neidhardt
2018-08-05  0:42       ` mcron Benjamin Slade
2018-08-05  8:45         ` mcron Pierre Neidhardt

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.