summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bargman2026-04-15 05:13:42 +0000
committerJohn Bargman2026-04-15 05:13:42 +0000
commit6f7bd5ba50978ccaf853a091940ddd8434674b0b (patch)
tree5fea681291ae48960b9d30623bcaddd44b3c5d13
parent9b0ed1778142f5d3b93dee52e5be3b587a86fc33 (diff)
downloadcrash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.tar
crash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.tar.gz
crash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.tar.bz2
crash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.tar.lz
crash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.tar.xz
crash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.tar.zst
crash-web-6f7bd5ba50978ccaf853a091940ddd8434674b0b.zip
add remote-command app for SSH execution on crash-over-burn-1
Usage: nix run .#remote-command -- "<command>" Deploy user: commander@193.16.42.36:1108
-rw-r--r--flake.nix20
1 files changed, 19 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index fa7ee5d..9667b90 100644
--- a/flake.nix
+++ b/flake.nix
@@ -22,7 +22,25 @@
in
{
formatter.x86_64-linux = pkgs.nixpkgs-fmt;
- apps.x86_64-linux = (nixinate.lib.genDeploy.x86_64-linux self) // ({ secrix = secrix self; });
+ apps.x86_64-linux =
+ let
+ remote = {
+ host = "193.16.42.36";
+ port = 1108;
+ user = "commander";
+ };
+ remoteCmd = pkgs.writeScriptBin "remote-cmd" ''
+ #!${pkgs.runtimeShell}
+ exec ${pkgs.openssh}/bin/ssh -p ${toString remote.port} -o StrictHostKeyChecking=accept-new ${remote.user}@${remote.host} "$@"
+ '';
+ in
+ (nixinate.lib.genDeploy.x86_64-linux self) // {
+ secrix = secrix self;
+ remote-command = {
+ type = "app";
+ program = "${remoteCmd}/bin/remote-cmd";
+ };
+ };
devShells.x86_64-linux.default =
pkgs.mkShell {
buildInputs = with pkgs; [ figlet tmux ];