commit e6cdf7d625ae867cbc0693785c1bc704ed79b1c2 parent 0a4c156f49b63798459f0dd819863ecf0513b340 Author: breadcat <breadcat@users.noreply.github.com> Date: Tue, 16 Jun 2026 11:00:51 +0100 Migrate SSH config to 26.05 syntax Diffstat:
| M | home/ssh.nix | | | 79 | +++++++++++++++++++++++++++++++++++++------------------------------------------ |
1 file changed, 37 insertions(+), 42 deletions(-)
diff --git a/home/ssh.nix b/home/ssh.nix @@ -4,61 +4,56 @@ programs.ssh = { enable = true; enableDefaultConfig = false; - matchBlocks = { - "*" = { - forwardAgent = false; - addKeysToAgent = "no"; - compression = false; - serverAliveInterval = 0; - serverAliveCountMax = 3; - hashKnownHosts = false; - userKnownHostsFile = "~/.ssh/known_hosts"; - controlMaster = "no"; - controlPath = "~/.ssh/master-%r@%n:%p"; - controlPersist = "no"; + settings = { + "*" = { + ForwardAgent = false; + AddKeysToAgent = "no"; + Compression = false; + ServerAliveInterval = 0; + ServerAliveCountMax = 3; + HashKnownHosts = false; + UserKnownHostsFile = "~/.ssh/known_hosts"; + ControlMaster = "no"; + ControlPath = "~/.ssh/master-%r@%n:%p"; + ControlPersist = "no"; }; "tunnel" = { - hostname = "${vars.user.domain}"; - user = "${vars.user.username}"; - port = vars.secrets.sshport; - identityFile = "${vars.secrets.privatekey}"; - extraOptions = { - RemoteCommand = "ssh -p 55013 ${vars.user.username}@localhost -i ${vars.secrets.privatekey}"; - RequestTTY = "force"; - }; + HostName = vars.user.domain; + User = vars.user.username; + Port = vars.secrets.sshport; + IdentityFile = vars.secrets.privatekey; + RemoteCommand = "ssh -p 55013 ${vars.user.username}@localhost -i ${vars.secrets.privatekey}"; + RequestTTY = "force"; }; "arcadia" = { - hostname = "192.168.1.6"; - user = "${vars.user.username}"; - port = vars.secrets.sshport; - identityFile = "${vars.secrets.privatekey}"; + HostName = "192.168.1.6"; + User = vars.user.username; + Port = vars.secrets.sshport; + IdentityFile = vars.secrets.privatekey; }; "ilias" = { - hostname = "192.168.1.3"; - user = "${vars.user.username}"; - port = vars.secrets.sshport; - identityFile = "${vars.secrets.privatekey}"; + HostName = "192.168.1.3"; + User = vars.user.username; + Port = vars.secrets.sshport; + IdentityFile = vars.secrets.privatekey; }; "router" = { - hostname = "192.168.1.1"; - user = "root"; - port = 22; + HostName = "192.168.1.1"; + User = "root"; + Port = 22; }; "ap" = { - hostname = "192.168.1.2"; - user = "root"; - port = 22; - extraOptions = { - HostKeyAlgorithms = "+ssh-rsa"; - }; + HostName = "192.168.1.2"; + User = "root"; + Port = 22; + HostKeyAlgorithms = "+ssh-rsa"; }; "artemis" = { - hostname = "${vars.user.domain}"; - user = "${vars.user.username}"; - port = vars.secrets.sshport; - identityFile = "${vars.secrets.privatekey}"; + HostName = vars.user.domain; + User = vars.user.username; + Port = vars.secrets.sshport; + IdentityFile = vars.secrets.privatekey; }; }; }; - }