summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-05-04 11:25:23 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-05-04 11:25:23 +0200
commit5362e99fbf2690d663cf8d61332ce8b0857abc83 (patch)
tree3fa654a94f69765822b55af5c9a4618cf48899f1
parentb805b2df3c7aab1de139ab501f45ed7a31b1b553 (diff)
downloadnixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar
nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar.gz
nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar.bz2
nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.tar.xz
nixos-5362e99fbf2690d663cf8d61332ce8b0857abc83.zip
more control over commands allowed over uucp
-rw-r--r--custom/uucp.nix13
-rw-r--r--ymir.nix1
2 files changed, 14 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 '';
21in { 22in {
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";
diff --git a/ymir.nix b/ymir.nix
index e8f92606..9a9f7b38 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -460,6 +460,7 @@ in rec {
460 Hostname odin.asgard.yggdrasil 460 Hostname odin.asgard.yggdrasil
461 IdentityFile ~/.ssh/odin 461 IdentityFile ~/.ssh/odin
462 ''; 462 '';
463 defaultCommands = ["rmail"];
463 }; 464 };
464 465
465 services.atd = { 466 services.atd = {