aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/admin.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 6ed3de9423..61bc17b2fe 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -49,6 +49,7 @@
unattended-upgrade-service-type
unattended-upgrade-configuration
unattended-upgrade-configuration?
+ unattended-upgrade-configuration-operating-system-file
unattended-upgrade-configuration-channels
unattended-upgrade-configuration-schedule
unattended-upgrade-configuration-services-to-restart
@@ -198,6 +199,8 @@ Old log files are removed or compressed according to the configuration.")
(define-record-type* <unattended-upgrade-configuration>
unattended-upgrade-configuration make-unattended-upgrade-configuration
unattended-upgrade-configuration?
+ (operating-system-file unattended-upgrade-operating-system-file
+ (default "/run/current-system/configuration.scm"))
(schedule unattended-upgrade-configuration-schedule
(default "30 01 * * 0"))
(channels unattended-upgrade-configuration-channels
@@ -228,6 +231,9 @@ Old log files are removed or compressed according to the configuration.")
(define expiration
(unattended-upgrade-system-expiration config))
+ (define config-file
+ (unattended-upgrade-operating-system-file config))
+
(define code
(with-imported-modules (source-module-closure '((guix build utils)
(gnu services herd)))
@@ -271,8 +277,7 @@ Old log files are removed or compressed according to the configuration.")
(report-invoke-error c)))
(invoke #$(file-append guix "/bin/guix")
"time-machine" "-C" #$channels
- "--" "system" "reconfigure"
- "/run/current-system/configuration.scm")
+ "--" "system" "reconfigure" #$config-file)
;; 'guix system delete-generations' fails when there's no
;; matching generation. Thus, catch 'invoke-error?'.