Skip to content

Commit

Permalink
nixci-build-remote: copy nixci itself
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Jul 13, 2024
1 parent 05ed86f commit 74dd679
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packages/nixci-build-remote.nix
Original file line number Diff line number Diff line change
@@ -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"
'';
}
2 changes: 1 addition & 1 deletion packages/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 74dd679

Please sign in to comment.