nixci-build-remote: copy nixci itself

This commit is contained in:
Sridhar Ratnakumar 2024-07-13 15:07:23 -04:00
parent 05ed86f8d6
commit 74dd679cc4
No known key found for this signature in database
2 changed files with 6 additions and 5 deletions

View file

@ -1,18 +1,19 @@
{ writeShellApplication, curl, jq, nix, nixci, ... }:
{ inputs, ... }:
{ writeShellApplication, jq, nix, ... }:
writeShellApplication {
name = "nixci-build-remote";
runtimeInputs = [ curl jq nix nixci ];
runtimeInputs = [ jq nix ];
meta.description = ''
`nixci build`, but build remotely over SSH.
'';
# TODO: This should handle --override-inputs
# TODO: This should also `nix copy` nixci itself.
text = ''
FLAKE=$(nix flake metadata --json | jq -r .path)
set -x
nix copy --to "ssh://$1" "$FLAKE"
nix copy --to "ssh://$1" ${inputs.nixci}
# shellcheck disable=SC2029
ssh "$1" nixci build "$FLAKE"
ssh "$1" nix run ${inputs.nixci}#default build "$FLAKE"
'';
}

View file

@ -4,7 +4,7 @@ self: super: {
fuckport = self.callPackage ./fuckport.nix { };
twitter-convert = self.callPackage ./twitter-convert { };
sshuttle-via = self.callPackage ./sshuttle-via.nix { };
nixci-build-remote = self.callPackage ./nixci-build-remote.nix { };
nixci-build-remote = self.callPackage (import ./nixci-build-remote.nix { inherit (flake) inputs; }) { };
nixci = flake.inputs.nixci.packages.${system}.default;
# nix-health = flake.inputs.nix-browser.packages.${system}.nix-health;
actualism-app = flake.inputs.actualism-app.packages.${system}.default;