operating-systems: buer: Use spawn-shell-command instead of system since a lambda action should be suspendable

main
Luis Guilherme Coelho 2024-11-25 03:30:48 -03:00
parent 153fda0b68
commit c4f002b98b
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 5 additions and 4 deletions

View File

@ -30,10 +30,11 @@ next calendar event.")))
(start #~(make-timer-constructor (start #~(make-timer-constructor
(calendar-event #:days-of-month '(1 15)) (calendar-event #:days-of-month '(1 15))
(lambda () (lambda ()
(let* ((btrfs "/run/current-system/profile/bin/btrfs") (let ((btrfs "/run/current-system/profile/bin/btrfs")
(date (strftime "%Y-%m-%d" (localtime (current-time))))) (date (strftime "%Y-%m-%d" (localtime (current-time)))))
(system* btrfs "subvolume" "snapshot" "/home" (spawn-shell-command
(string-append "/snapshots/home/" date)))))) (string-append btrfs " subvolume snapshot"
" /home /snapshots/home/" date))))))
(stop #~(make-timer-destructor)) (stop #~(make-timer-destructor))
(actions (list timer-trigger-action)))) (actions (list timer-trigger-action))))