Subject: Re: [bug#36404] [PATCH 2/3] machine: Reimplement 'managed-host-environment-type' deployment.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 07 Jul 2019 00:13:45 +0200

[email-masked] (Jakob L. Kreuze) skribis:

> +  (define (run-switch-to-system machine)
> +    "Monadic procedure serializing the items in MACHINE necessary to build a
> +G-Expression with 'switch-to-system'."
> +    (let* ((os (machine-system machine))
> +           (activation-script (operating-system-activation-script os)))
> +      (mlet %store-monad ((osdrv (operating-system-derivation os)))
> +        (machine-remote-eval machine
> +                             (switch-to-system osdrv activation-script)))))

Normally you should never need to call ‘operating-system-derivation’
because you can just insert an <operating-system> in a gexp and it’ll do
the right thing:

  #~(frob #$os)

Ludo’.