From 5362e99fbf2690d663cf8d61332ce8b0857abc83 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 4 May 2016 11:25:23 +0200 Subject: more control over commands allowed over uucp --- custom/uucp.nix | 13 +++++++++++++ ymir.nix | 1 + 2 files changed, 14 insertions(+) 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 chat "" protocol e command-path ${concatStringsSep " " config.services.uucp.commandPath} + commands ${if config.services.uucp.commands ? name then concatStringsSep " " config.services.uucp.commands."${name}" else config.services.uucp.defaultCommands} ''; in { options = { @@ -64,6 +65,18 @@ in { ''; }; + defaultCommands = mkOption { + type = types.listOf types.string; + default = ["rmail"]; + description = "Commands allowed for remotes without explicit override"; + }; + + commands = mkOption { + type = types.attrsOf (types.listOf types.string); + default = {}; + description = "Override commands for specific remotes"; + }; + spoolDir = mkOption { type = types.path; 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 { Hostname odin.asgard.yggdrasil IdentityFile ~/.ssh/odin ''; + defaultCommands = ["rmail"]; }; services.atd = { -- cgit v1.2.3