diff options
| -rw-r--r-- | custom/uucp.nix | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix index 51caf13c..b58268ae 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix | |||
| @@ -6,7 +6,7 @@ let | |||
| 6 | portSpec = name: '' | 6 | portSpec = name: '' |
| 7 | port ${name} | 7 | port ${name} |
| 8 | type pipe | 8 | type pipe |
| 9 | protocol e | 9 | protocol ${if config.services.uucp.protocols ? name then config.services.uucp.protocols."${name}" else config.services.uucp.defaultProtocol} |
| 10 | reliable true | 10 | reliable true |
| 11 | command ${pkgs.openssh}/bin/ssh -x -o batchmode=yes ${name} | 11 | command ${pkgs.openssh}/bin/ssh -x -o batchmode=yes ${name} |
| 12 | ''; | 12 | ''; |
| @@ -15,7 +15,7 @@ let | |||
| 15 | time Any | 15 | time Any |
| 16 | port ${name} | 16 | port ${name} |
| 17 | chat "" | 17 | chat "" |
| 18 | protocol e | 18 | protocol ${if config.services.uucp.protocols ? name then config.services.uucp.protocols."${name}" else config.services.uucp.defaultProtocol} |
| 19 | command-path ${concatStringsSep " " config.services.uucp.commandPath} | 19 | command-path ${concatStringsSep " " config.services.uucp.commandPath} |
| 20 | commands ${concatStringsSep " " (if config.services.uucp.commands ? name then config.services.uucp.commands."${name}" else config.services.uucp.defaultCommands)} | 20 | commands ${concatStringsSep " " (if config.services.uucp.commands ? name then config.services.uucp.commands."${name}" else config.services.uucp.defaultCommands)} |
| 21 | ''; | 21 | ''; |
| @@ -77,6 +77,18 @@ in { | |||
| 77 | description = "Override commands for specific remotes"; | 77 | description = "Override commands for specific remotes"; |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | defaultProtocol = mkOption { | ||
| 81 | type = types.string; | ||
| 82 | default = "e"; | ||
| 83 | description = "UUCP protocol to use within ssh unless overriden"; | ||
| 84 | }; | ||
| 85 | |||
| 86 | protocols = mkOption { | ||
| 87 | type = types.attrsOf types.string; | ||
| 88 | default = {}; | ||
| 89 | description = "UUCP protocols to use for specific remotes"; | ||
| 90 | }; | ||
| 91 | |||
| 80 | spoolDir = mkOption { | 92 | spoolDir = mkOption { |
| 81 | type = types.path; | 93 | type = types.path; |
| 82 | default = "/var/spool/uucp"; | 94 | default = "/var/spool/uucp"; |
