on master help sign in
Obelisk.Command.Deploy: use `--use-substitutes`

From `man nix-copy-closure`: --use-substitutes / -s Attempt to download missing paths on the target machine using Nix’s substitute mechanism. Any paths that cannot be substituted on the target are still copied normally from the source. This is useful, for instance, if the connection between the source and target machine is slow, but the connection between the target machine and nixos.org (the default binary cache server) is fast.

commit60bfa8b57788bc251cac199548afff8c028639c0 authorVaibhav Sagar <vaibhav.sagar@obsidian.systems> dateTue 19 Mar 2019, 14:50 (8 years ago) parentb2be637
1 file changed+1−1
lib/command/src/Obelisk/Command/Deploy.hs+1−1
lib/command/src/Obelisk/Command/Deploy.hs+1−1
@@ -136,7 +136,7 @@ deployPush deployPath getNixBuilders = do
136136 withSpinner "Uploading closures" $ ifor_ buildOutputByHost $ \host outputPath -> do
137137 callProcess'
138138 (Map.fromList [("NIX_SSHOPTS", unwords sshOpts)])
139− "nix-copy-closure" ["-v", "--to", "root@" <> host, "--gzip", outputPath]
139+ "nix-copy-closure" ["-v", "--to", "--use-substitutes", "root@" <> host, "--gzip", outputPath]
140140 withSpinner "Uploading config" $ ifor_ buildOutputByHost $ \host _ -> do
141141 callProcessAndLogOutput (Notice, Warning) $
142142 proc "rsync"