Subject: [bug#36404] [PATCH v4 2/4] gnu: Add machine type for deployment specifications.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 04 Jul 2019 11:19:03 +0200

Hi Jakob and all!

Apologies for not moving as fast as you do!  :-)

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

> +(define (switch-to-system machine)
> +  "Monadic procedure creating a new generation on MACHINE and execute the
> +activation script for the new system configuration."

[...]

> +(define (upgrade-shepherd-services machine)
> +  "Monadic procedure unloading and starting services on the remote as needed
> +to realize the MACHINE's system configuration."

[...]

> +(define (machine-boot-parameters machine)
> +  "Monadic procedure returning a list of 'boot-parameters' for the generations
> +of MACHINE's system profile, ordered from most recent to oldest."

[...]

> +(define (install-bootloader machine)
> +  "Create a bootloader entry for the new system generation on MACHINE, and
> +configure the bootloader to boot that generation by default."

To me the end goal was to move these “effectful” bits into a script,
such that both ‘guix system reconfigure’ and ‘guix deploy’ would only
have to run that script, locally or remotely.  That would avoid
duplicating these somewhat tricky procedures.

Now, perhaps we can start like this, and leave factorization for later?
I just want to make sure we don’t forget about that and let it evolve
into something we have a hard time maintaining.

WDYT?

Thanks,
Ludo’.