From 96b03e1bf70e5ed6021481710a7d6a53a9211c1f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 15 May 2016 23:07:27 +0200 Subject: allow selection of uucp protocols --- custom/uucp.nix | 16 ++++++++++++++-- 1 file 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 portSpec = name: '' port ${name} type pipe - protocol e + protocol ${if config.services.uucp.protocols ? name then config.services.uucp.protocols."${name}" else config.services.uucp.defaultProtocol} reliable true command ${pkgs.openssh}/bin/ssh -x -o batchmode=yes ${name} ''; @@ -15,7 +15,7 @@ let time Any port ${name} chat "" - protocol e + protocol ${if config.services.uucp.protocols ? name then config.services.uucp.protocols."${name}" else config.services.uucp.defaultProtocol} command-path ${concatStringsSep " " config.services.uucp.commandPath} commands ${concatStringsSep " " (if config.services.uucp.commands ? name then config.services.uucp.commands."${name}" else config.services.uucp.defaultCommands)} ''; @@ -77,6 +77,18 @@ in { description = "Override commands for specific remotes"; }; + defaultProtocol = mkOption { + type = types.string; + default = "e"; + description = "UUCP protocol to use within ssh unless overriden"; + }; + + protocols = mkOption { + type = types.attrsOf types.string; + default = {}; + description = "UUCP protocols to use for specific remotes"; + }; + spoolDir = mkOption { type = types.path; default = "/var/spool/uucp"; -- cgit v1.2.3