Migrate packages
This commit is contained in:
26
pkgs/deploy-to-pianopi/default.nix
Normal file
26
pkgs/deploy-to-pianopi/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
rsync,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "deploy-to-pianopi";
|
||||
|
||||
runtimeInputs = [ rsync ];
|
||||
|
||||
text = ''
|
||||
set -e
|
||||
set -x
|
||||
|
||||
nix build .#packages.aarch64-linux.default --print-out-paths
|
||||
# copy dependencies etc
|
||||
nix copy --to ssh://julian@pianopi.local .#packages.aarch64-linux.default
|
||||
|
||||
# This should be expanded on the client side
|
||||
# shellcheck disable=SC2029
|
||||
# ssh julian@pianopi.local ln -sf "$DERIVATION_PATH"/bin/\* /home/julian/.local/bin
|
||||
# ssh julian@pianopi.local nix profile install "$DERIVATION_PATH"
|
||||
|
||||
rsync -ac result/bin/ julian@pianopi.local:/home/julian/.local/bin
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user