Skip to content

Commit 7869a3b

Browse files
committed
Document deployment methods
fixes #37
1 parent 4bf60b1 commit 7869a3b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ lollypops.deployment = {
200200
# Where on the remote the configuration (system flake) is placed
201201
config-dir = "/var/src/lollypops";
202202
203+
deploy-method = "copy";
204+
203205
# SSH connection parameters
204206
ssh.host = "${config.networking.hostName}";
205207
ssh.user = "root";
@@ -217,6 +219,28 @@ Setting `lollypops.deployment.local-evaluation` to true, will result in
217219
evaluation being done on the local side. This requires `nixos-rebuild` in your
218220
`$PATH`
219221

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+
220244
**Note:** If using `sudo`, the user you're connecting as still needs to be able
221245
to access the Nix daemon. This is the default in NixOS.
222246

0 commit comments

Comments
 (0)