From 3908e0393d57a41812d8e7719a675a0b1def3f58 Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Tue, 17 Sep 2024 13:49:16 +0300 Subject: [PATCH] Do remote builds for deployment --- flake.nix | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 9da0ca5..5292969 100644 --- a/flake.nix +++ b/flake.nix @@ -73,23 +73,26 @@ }; }; - apps.${system} = { - default = - let - zola = pkgs.writeShellScriptBin "zola" '' - cd src - ${preparePhase} - ${pkgs.zola}/bin/zola --root . ''${@} - ''; - in - { + apps.${system} = + let + zola = pkgs.writeShellScriptBin "zola" '' + cd src + ${preparePhase} + ${pkgs.zola}/bin/zola --root . ''${@} + ''; + deploy = pkgs.writeShellScriptBin "deploy" '' + ${pkgs.deploy-rs}/bin/deploy --remote-build ''${@} + ''; + in + { + default = { type = "app"; program = "${zola}/bin/zola"; }; - deploy = { - type = "app"; - program = "${pkgs.deploy-rs}/bin/deploy"; + deploy = { + type = "app"; + program = "${deploy}/bin/deploy"; + }; }; - }; }; }