mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
Add nixci-build-remote
A script to nix build remotely over ssh, without necessarily configuring distributed builds.
This commit is contained in:
parent
2607a26c7d
commit
05ed86f8d6
3 changed files with 20 additions and 0 deletions
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
# Useful for Nix development
|
||||
nixci
|
||||
nixci-build-remote
|
||||
nix-health
|
||||
nixpkgs-fmt
|
||||
just
|
||||
|
|
|
|||
18
packages/nixci-build-remote.nix
Normal file
18
packages/nixci-build-remote.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ writeShellApplication, curl, jq, nix, nixci, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "nixci-build-remote";
|
||||
runtimeInputs = [ curl jq nix nixci ];
|
||||
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"
|
||||
# shellcheck disable=SC2029
|
||||
ssh "$1" nixci build "$FLAKE"
|
||||
'';
|
||||
}
|
||||
|
|
@ -4,6 +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 = 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue