diff options
| -rw-r--r-- | custom/uucp.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix index 2a1fb401..59cfab59 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix | |||
| @@ -3,12 +3,12 @@ | |||
| 3 | with lib; | 3 | with lib; |
| 4 | 4 | ||
| 5 | let | 5 | let |
| 6 | portSpec = name: node: concatStringsSep "\n" (mapAttrsToList (portName: port: '' | 6 | portSpec = name: node: concatStringsSep "\n" (map (port: '' |
| 7 | port ${name}.${portName} | 7 | port ${name}.${port} |
| 8 | type pipe | 8 | type pipe |
| 9 | protocol ${node.protocols} | 9 | protocol ${node.protocols} |
| 10 | reliable true | 10 | reliable true |
| 11 | command ${pkgs.openssh}/bin/ssh -x -o batchmode=yes ${name}.${portName} | 11 | command ${pkgs.openssh}/bin/ssh -x -o batchmode=yes ${name}.${port} |
| 12 | '') node.hostnames); | 12 | '') node.hostnames); |
| 13 | sysSpec = name: '' | 13 | sysSpec = name: '' |
| 14 | system ${name} | 14 | system ${name} |
| @@ -16,12 +16,12 @@ let | |||
| 16 | chat "" | 16 | chat "" |
| 17 | command-path ${concatStringsSep " " cfg.commandPath} | 17 | command-path ${concatStringsSep " " cfg.commandPath} |
| 18 | commands ${concatStringsSep " " node.commands} | 18 | commands ${concatStringsSep " " node.commands} |
| 19 | ${concatStringsSep "\nalternate\n" (mapAttrsToList (portName: port: '' | 19 | ${concatStringsSep "\nalternate\n" (map (port: '' |
| 20 | port ${name}.${portName} | 20 | port ${name}.${port} |
| 21 | '') node.hostnames)} | 21 | '') node.hostnames)} |
| 22 | ''; | 22 | ''; |
| 23 | sshConfig = name: node: concatStringsSep "\n" (mapAttrsToList (portName: port: '' | 23 | sshConfig = name: node: concatStringsSep "\n" (map (port: '' |
| 24 | Host ${name}.${portName} | 24 | Host ${name}.${port} |
| 25 | Hostname ${port} | 25 | Hostname ${port} |
| 26 | IdentitiesOnly Yes | 26 | IdentitiesOnly Yes |
| 27 | IdentityFile ${cfg.sshKeyDir}/${name}.pub | 27 | IdentityFile ${cfg.sshKeyDir}/${name}.pub |
| @@ -62,9 +62,9 @@ let | |||
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | hostnames = mkOption { | 64 | hostnames = mkOption { |
| 65 | type = types.attrsOf types.string; | 65 | type = types.listOf types.string; |
| 66 | default = {}; | 66 | default = []; |
| 67 | description = ""; | 67 | description = "Hostnames to try in order when connecting"; |
| 68 | }; | 68 | }; |
| 69 | }; | 69 | }; |
| 70 | }; | 70 | }; |
