~ruther/guix-config

e833d6c4aa75336ab20c2e3843d332e627643e84 — Rutherther 8 days ago 072fae5
feat: gc root operating system derivation
1 files changed, 26 insertions(+), 1 deletions(-)

M config.scm
M config.scm => config.scm +26 -1
@@ 237,4 237,29 @@
    ;; Allow resolution of '.local' host names with mDNS.
    (name-service-switch %mdns-host-lookup-nss)))

%ruther/base-laptop-os
;; Takes an operating system and gc roots its derivation
(define (operating-system-with-build-inputs os)
  (operating-system
    (inherit os)
    (services (operating-system-user-services os))
    (services
     (cons*
      (simple-service 'gc-root-system-derivation
                      gc-root-service-type
                      (list
                       (derivation-file-name
                        (with-store %store
                          (run-with-store %store
                            (operating-system-derivation os))))
                       (with-store %store
                         (run-with-store %store
                           (without-grafting
                            (operating-system-derivation os))))
                       (derivation-file-name
                        (with-store %store
                          (run-with-store %store
                            (without-grafting
                             (operating-system-derivation os)))))))
      (operating-system-user-services os)))))

(operating-system-with-build-inputs %ruther/base-laptop-os)

Do not follow this link