Do remote builds for deployment

This commit is contained in:
Fabian Hauser 2024-09-17 13:49:16 +03:00
parent a8ea1d1149
commit 3908e0393d

View file

@ -73,22 +73,25 @@
}; };
}; };
apps.${system} = { apps.${system} =
default =
let let
zola = pkgs.writeShellScriptBin "zola" '' zola = pkgs.writeShellScriptBin "zola" ''
cd src cd src
${preparePhase} ${preparePhase}
${pkgs.zola}/bin/zola --root . ''${@} ${pkgs.zola}/bin/zola --root . ''${@}
''; '';
deploy = pkgs.writeShellScriptBin "deploy" ''
${pkgs.deploy-rs}/bin/deploy --remote-build ''${@}
'';
in in
{ {
default = {
type = "app"; type = "app";
program = "${zola}/bin/zola"; program = "${zola}/bin/zola";
}; };
deploy = { deploy = {
type = "app"; type = "app";
program = "${pkgs.deploy-rs}/bin/deploy"; program = "${deploy}/bin/deploy";
}; };
}; };
}; };