diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-05-04 11:25:23 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-05-04 11:25:23 +0200 |
commit | 5362e99fbf2690d663cf8d61332ce8b0857abc83 (patch) | |
tree | 3fa654a94f69765822b55af5c9a4618cf48899f1 /custom | |
parent | b805b2df3c7aab1de139ab501f45ed7a31b1b553 (diff) | |
download | nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar.gz nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar.bz2 nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar.xz nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.zip |
more control over commands allowed over uucp
Diffstat (limited to 'custom')
-rw-r--r-- | custom/uucp.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/custom/uucp.nix b/custom/uucp.nix index 90ad5f0f..080a5951 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix | |||
@@ -17,6 +17,7 @@ let | |||
17 | chat "" | 17 | chat "" |
18 | protocol e | 18 | protocol e |
19 | command-path ${concatStringsSep " " config.services.uucp.commandPath} | 19 | command-path ${concatStringsSep " " config.services.uucp.commandPath} |
20 | commands ${if config.services.uucp.commands ? name then concatStringsSep " " config.services.uucp.commands."${name}" else config.services.uucp.defaultCommands} | ||
20 | ''; | 21 | ''; |
21 | in { | 22 | in { |
22 | options = { | 23 | options = { |
@@ -64,6 +65,18 @@ in { | |||
64 | ''; | 65 | ''; |
65 | }; | 66 | }; |
66 | 67 | ||
68 | defaultCommands = mkOption { | ||
69 | type = types.listOf types.string; | ||
70 | default = ["rmail"]; | ||
71 | description = "Commands allowed for remotes without explicit override"; | ||
72 | }; | ||
73 | |||
74 | commands = mkOption { | ||
75 | type = types.attrsOf (types.listOf types.string); | ||
76 | default = {}; | ||
77 | description = "Override commands for specific remotes"; | ||
78 | }; | ||
79 | |||
67 | spoolDir = mkOption { | 80 | spoolDir = mkOption { |
68 | type = types.path; | 81 | type = types.path; |
69 | default = "/var/spool/uucp"; | 82 | default = "/var/spool/uucp"; |