Deployflake as dir

This commit is contained in:
2023-03-09 22:03:09 -05:00
parent 0f73ee0bbc
commit a439b7d69a

View File

@@ -116,8 +116,9 @@
hydraJobs = checks // lib.optionalAttrs
(system == "x86_64-linux" ) {
runCommandHook = let
deployFlake = pkgs.runCommand "deploy-flake" {} ''
substitute ${./deploy/flake.nix} $out \
deployFlake = pkgs.runCommand "New Alan Deploy" {} ''
mkdir $out
substitute ${./deploy/flake.nix} $out/flake.nix \
--replace "main.tar.gz" "${self.rev}.tar.gz"
'';
in {
@@ -129,7 +130,7 @@
} ''
echo '#!${pkgs.runtimeShell}' >> $out
echo 'export flake=${deployFlake}' >> $out
echo Deploying $flake
echo Deploying ${deployFlake}
echo '# ${pkgs.runtimeShell} ./secrets/deploy.sh' >> $out
chmod +x $out
'';