let # define a block that just takes a hostname and returns attrset to not repeat the same fields sshBlock = hostname: { inherit hostname; user = "osbm"; identityFile = "~/.ssh/id_ed25519"; extraOptions = { # [ERROR] - (starship::print): Under a 'dumb' terminal (TERM=dumb). "RemoteCommand" = "fish"; "RequestTTY" = "force"; }; hashKnownHosts = true; compression = true; }; # sshBlockAtreus is the same as sshBlock but with 8090 as the port sshBlockAtreus = hostname: { inherit hostname; user = "osbm"; identityFile = "~/.ssh/id_ed25519"; port = 8022; hashKnownHosts = true; compression = true; # fish not found error ??? }; in { programs.ssh = { enable = true; enableDefaultConfig = false; matchBlocks = { ymir = sshBlock "192.168.0.2"; ymir-ts = sshBlock "ymir.curl-boga.ts.net"; atreus = sshBlockAtreus "192.168.0.3"; atreus-ts = sshBlockAtreus "atreus.curl-boga.ts.net"; tartarus = sshBlock "192.168.0.4"; tartarus-ts = sshBlock "tartarus.curl-boga.ts.net"; pochita = sshBlock "192.168.0.9"; pochita-ts = sshBlock "pochita.curl-boga.ts.net"; harmonica = sshBlock "192.168.0.11"; harmonica-ts = sshBlock "harmonica.curl-boga.ts.net"; wallfacer = sshBlock "192.168.0.5"; wallfacer-ts = sshBlock "wallfacer.curl-boga.ts.net"; prometheus = sshBlock "192.168.0.12"; prometheus-ts = sshBlock "prometheus.curl-boga.ts.net"; apollo = sshBlock "152.53.152.129"; apollo-ts = sshBlock "apollo.curl-boga.ts.net"; apollo-initrd = { hostname = "152.53.152.129"; port = 2222; user = "root"; identityFile = "~/.ssh/id_ed25519"; hashKnownHosts = true; compression = true; }; # artemis }; }; }