devshell: Add container support to ssh-machine
Update docs / update (push) Canceled after 0s
CI / Check, build and cache nixfiles (push) Canceled after 25m22s

Port `ssh-machine` to Python and derive container targets from their
hosting boxes. Configure `tower` to prefer its home DNS name and fall
back to its Tailscale name.
This commit is contained in:
jackos1998 committed 2026-11-22 23:26:00 +00:00
1 parent 19265dfc75
commit a75d94f492
9 files changed
+220 -91

No files matched your search

+3 -3
View File
@@ -4,8 +4,8 @@ let
devKey = ".keys/dev.key";
sshMachine = pkgs.writeShellApplication {
name = "ssh-machine";
runtimeInputs = with pkgs; [ coreutils git jujutsu jq openssh ];
text = builtins.readFile ./ssh-machine.sh;
runtimeInputs = with pkgs; [ git jujutsu netcat-openbsd openssh ];
text = ''exec ${pkgs.python3.interpreter} ${./ssh-machine.py} "$@"'';
};
in
{
@@ -56,7 +56,7 @@ in
{
name = "ssh-machine";
category = "utilities";
help = "SSH to a machine by NixOS system or home-manager config name";
help = "Connect to a box, home-manager config or NixOS container by name";
command = ''exec ${sshMachine}/bin/ssh-machine "$@"'';
}
{