Compare

51bdc7674c132f013c02c8b5b4c5f671a5a2de1c .. bd9bdb7ba66a5a22ebab2d04d65a281872e77b96 · 1 commits

Changed files

Commits

HashSubjectAuthorDate
bd9bdb7b just gonna use -delete Ryan Schanzenbacher
diff --git a/modules/ryan-services/file-manager.scm b/modules/ryan-services/file-manager.scm
index 9c1493a..780ac57 100644
--- a/modules/ryan-services/file-manager.scm
+++ b/modules/ryan-services/file-manager.scm
@@ -38,22 +38,22 @@
(define downloads-garbage-collector-service
(match-record-lambda <downloads-garbage-collector-configuration>
(user)
- (let ((cleanup-command #~(list "find" (string-append "/home/" #$user "/Downloads") "-mtime" "+7" "-exec" "rm" "-rf" "'{}'" ";")))
+ (let ((cleanup-command #~(list "find" (string-append "/home/" #$user "/Downloads") "-mtime" "+7" "-delete")))
(shepherd-service
(documentation "Garbage collect downloaded files more than 1 week old for USER.")
(provision '(downloads-garbage-collector))
;(requirement '(root))
(modules '((shepherd service timer)))
(start #~(make-timer-constructor
- (calendar-event #:hours '(19) #:minutes '(50)
- #:days-of-week '(monday))
+ (calendar-event #:hours '(08) #:minutes '(30)
+ #:days-of-week '(tuesday))
(command #$cleanup-command)))
(stop #~(make-timer-destructor))
(actions (list (shepherd-action
(name 'trigger)
(documentation "Trigger GC in Downloads folder for USER")
(procedure #~(lambda _
- (system (string-join #$cleanup-command " ")))))))))))
+ (apply system* #$cleanup-command))))))))))
(define-public downloads-garbage-collector-service-type
(service-type