On Mon, Jan 15 2024, Richard Sent wrote: > At present this can be worked around by commenting out entries on the > list, but this requires > a) Already knowing what machine is offline > b) Remembering to uncomment it later when the machine goes back online > c) Generally feels "ugly" in a way that most Guix commands don't. > d) Makes version control a pain
This is generally what I've done, but I see this as a manual form of something that could easily be added the machines.scm file itself. For instance, you could define a helper function and use it to filter the list of machines, like so: (define (reachable-host? machine) (let ((configuration (machine-configuration machine))) (cond ((machine-ssh-configuration? configuration) (zero? (system* "ssh" (machine-ssh-configuration-host-name configuration) "--" "true"))) (else #f)))) (filter reachable-host? (list (machine ...) (machine ...))) Using this sort of approach can implement whatever strategy you want, as long as you can determine the machines which you want to deploy to up-front (i.e. this can't implement a strategy that handles failure partway through deployment). Carlo