summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-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 ];