@@ -200,6 +200,8 @@ lollypops.deployment = {
200
200
# Where on the remote the configuration (system flake) is placed
201
201
config-dir = "/var/src/lollypops";
202
202
203
+ deploy-method = "copy";
204
+
203
205
# SSH connection parameters
204
206
ssh.host = "${config.networking.hostName}";
205
207
ssh.user = "root";
@@ -217,6 +219,28 @@ Setting `lollypops.deployment.local-evaluation` to true, will result in
217
219
evaluation being done on the local side. This requires ` nixos-rebuild ` in your
218
220
` $PATH `
219
221
222
+ #### Deployment method
223
+
224
+ lollypops supports two methods of copying the flake to the remote machine when
225
+ deploying. Both are nix native tooling and don't require any further
226
+ dependencies, but may be suited in different cases. Use the
227
+ ` lollypops.deployment.deploy-method ` option to select what should be used.
228
+
229
+ 1 . ` copy ` : This is the default. It will only copy the flake itself during the
230
+ ` deploy-flake ` task. It will usually be faster when deploying from a home
231
+ internet connection, as all the dependencies are later downloaded from caches
232
+ by nix instead of being uploaded directly from the local machine to the
233
+ remote. It requires the remote machine to be able to access all flake inputs
234
+ that, e.g. private repositories which may be required for the build.
235
+ 2 . ` archvie ` : This method uses [ nix flake
236
+ archive] ( https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-archive )
237
+ to copy the flake ** and** it's inputs to the remote. Everything will be
238
+ copied from the local machine to the remote. This ensures that everything
239
+ needed for the rebuild is already on the remote when it starts, theoretically
240
+ making it even possible to rebuild without internet access. It also allows
241
+ rebuilding when private repositories are required as inputs.
242
+ If you have a slow upload speed on your local machine, it may take longer.
243
+
220
244
** Note:** If using ` sudo ` , the user you're connecting as still needs to be able
221
245
to access the Nix daemon. This is the default in NixOS.
222
246
0 commit comments