diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-06 13:17:23 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-06 13:17:23 +0200 |
commit | a4cb7c38cbdf32c610029ac42274a544f243ce79 (patch) | |
tree | c63d6f382e52c163a17257eae28c2157ebb21f2d /custom | |
parent | 3b02aa4d54f5fa04bb708d336110abf07e63c240 (diff) | |
download | nixos-a4cb7c38cbdf32c610029ac42274a544f243ce79.tar nixos-a4cb7c38cbdf32c610029ac42274a544f243ce79.tar.gz nixos-a4cb7c38cbdf32c610029ac42274a544f243ce79.tar.bz2 nixos-a4cb7c38cbdf32c610029ac42274a544f243ce79.tar.xz nixos-a4cb7c38cbdf32c610029ac42274a544f243ce79.zip |
…
Diffstat (limited to 'custom')
-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 | }; |