- (run-with-store store
- (mbegin %store-monad
- (set-guile-for-build (default-guile))
- (case action
- ((extension-graph)
- (export-extension-graph os (current-output-port)))
- ((shepherd-graph)
- (export-shepherd-graph os (current-output-port)))
- (else
- (unless (memq action '(build init))
- (warn-about-old-distro #:suggested-command
- "guix system reconfigure"))
-
- (perform-action action os
- #:dry-run? dry?
- #:derivations-only? (assoc-ref opts
- 'derivations-only?)
- #:use-substitutes? (assoc-ref opts 'substitutes?)
- #:skip-safety-checks?
- (assoc-ref opts 'skip-safety-checks?)
- #:file-system-type (assoc-ref opts 'file-system-type)
- #:image-size (assoc-ref opts 'image-size)
- #:full-boot? (assoc-ref opts 'full-boot?)
- #:container-shared-network?
- (assoc-ref opts 'container-shared-network?)
- #:mappings (filter-map (match-lambda
- (('file-system-mapping . m)
- m)
- (_ #f))
- opts)
- #:install-bootloader? bootloader?
- #:target target-file
- #:bootloader-target bootloader-target
- #:gc-root (assoc-ref opts 'gc-root)))))
- #:target target
- #:system system))
+ (with-build-handler (build-notifier #:use-substitutes?
+ (assoc-ref opts 'substitutes?)
+ #:verbosity
+ (verbosity-level opts)
+ #:dry-run?
+ (assoc-ref opts 'dry-run?))
+ (run-with-store store
+ (mbegin %store-monad
+ (set-guile-for-build (default-guile))
+ (case action
+ ((extension-graph)
+ (export-extension-graph os (current-output-port)))
+ ((shepherd-graph)
+ (export-shepherd-graph os (current-output-port)))
+ (else
+ (unless (memq action '(build init))
+ (warn-about-old-distro #:suggested-command
+ "guix system reconfigure"))
+
+ (perform-action action os
+ #:dry-run? dry?
+ #:derivations-only? (assoc-ref opts
+ 'derivations-only?)
+ #:use-substitutes? (assoc-ref opts 'substitutes?)
+ #:skip-safety-checks?
+ (assoc-ref opts 'skip-safety-checks?)
+ #:validate-reconfigure
+ (assoc-ref opts 'validate-reconfigure)
+ #:image-type (lookup-image-type-by-name
+ (assoc-ref opts 'image-type))
+ #:image-size (assoc-ref opts 'image-size)
+ #:volatile-root?
+ (assoc-ref opts 'volatile-root?)
+ #:full-boot? (assoc-ref opts 'full-boot?)
+ #:container-shared-network?
+ (assoc-ref opts 'container-shared-network?)
+ #:mappings (filter-map (match-lambda
+ (('file-system-mapping . m)
+ m)
+ (_ #f))
+ opts)
+ #:install-bootloader? bootloader?
+ #:label label
+ #:target target-file
+ #:bootloader-target bootloader-target
+ #:gc-root (assoc-ref opts 'gc-root)))))
+ #:target target
+ #:system system)))