Should `guix deploy` save to the deployed server the operating-system, or the entire file passed into the command?

OpenSubmitted by Katherine Cox-Buday.
One participant
  • Katherine Cox-Buday
Katherine Cox-Buday wrote on 8 Sep 05:09 +0200
(address .
*Observed Behavior:*
Invoking `guix deploy my-config.scm` will store `my-config.scm` in thedeployed server's store, and links that as`/run/current-system/configuration.scm`.
*Expected Behavior*
I expected the deployed server to only be made aware of the requested`operating-system` declaration. In other words, `my-config.scm` containsa list of machines, and each machine has an `operating-system`declaration. I would expect each deployed machine to only have a copy oftheir, and only their, `operating-system` declaration, fully resolvedfrom Guile variables into strings and such.
`guix deploy` expects a file that "evaluates to a list of machineobjects". Because of this, it is expected that multiple machines aredeclared in a single file. These machines may not be related to eachother, and they may even have information that should be kept from oneanother. Therefore, deploying the entire file's contents to a deployedmachine's remote store is incorrect behavior.
Further, `guix deploy` works if the file given does something like`(load "my-private-stuff.scm")`. It will resolve the Guile variablesbefore deploying, and everything will work. But the `configuration.scm`on the deployed server will only have a reference to the `load` whichwon't be in the store. The unresolved Guile variables will be listedwhere they are used.
Each machine can reside in a separate file, and then `guix deploy` canbe executed for each file with:
find . -iregex '.*\.scm' -print -execdir guix deploy "{}" \;
-- Katherine
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to