summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-05-15 23:07:27 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-05-15 23:07:27 +0200
commit96b03e1bf70e5ed6021481710a7d6a53a9211c1f (patch)
tree20777e39d566a90efc24ef093effcdec5e42e21a /custom
parent6b66a28152c56a79aaad90087519ce563c76b5a4 (diff)
downloadnixos-96b03e1bf70e5ed6021481710a7d6a53a9211c1f.tar
nixos-96b03e1bf70e5ed6021481710a7d6a53a9211c1f.tar.gz
nixos-96b03e1bf70e5ed6021481710a7d6a53a9211c1f.tar.bz2
nixos-96b03e1bf70e5ed6021481710a7d6a53a9211c1f.tar.xz
nixos-96b03e1bf70e5ed6021481710a7d6a53a9211c1f.zip
allow selection of uucp protocols
Diffstat (limited to 'custom')
-rw-r--r--custom/uucp.nix16
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";