From ec15b0dfb49af79e13f380719c850194762dec63 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 27 Apr 2016 13:35:30 +0200 Subject: rmail --- custom/uucp.nix | 28 ++++++++++++++++++---------- ymir.nix | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/custom/uucp.nix b/custom/uucp.nix index 602f95fd..164a5e02 100644 --- a/custom/uucp.nix +++ b/custom/uucp.nix @@ -172,20 +172,28 @@ in { environment.systemPackages = with pkgs; [ uucp - (pkgs.writeScriptBin "rmail" '' - #!${pkgs.stdenv.shell} + ({ stdenv }: stdenv.lib.mkDerivation { + name = "rmail"; + src = pkgs.writeScript "rmail" '' + #!${pkgs.stdenv.shell} - # Dummy UUCP rmail command for postfix/qmail systems + # Dummy UUCP rmail command for postfix/qmail systems - IFS=" " read junk from junk junk junk junk junk junk junk relay + IFS=" " read junk from junk junk junk junk junk junk junk relay - case "$from" in - *[@!]*) ;; - *) from="$from@$relay";; - esac + case "$from" in + *[@!]*) ;; + *) from="$from@$relay";; + esac - exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" - '') + exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" + ''; + builder = pkgs.writeScript "builder" '' + #!${stdenv.shell} + mkdir -p $out/bin + ln -s ${src} $out/bin/rmail + ''; + }); ]; }; } diff --git a/ymir.nix b/ymir.nix index eb4bf546..26980944 100644 --- a/ymir.nix +++ b/ymir.nix @@ -342,7 +342,7 @@ in rec { enable = true; nodeName = "ymir"; remoteNodes = { - "isaac" = ["pwd" "rmail"]; # legacy name for odin + "isaac" = ["pwd" "${pkgs.rmail}/bin/rmail"]; # legacy name for odin }; sshUser = { openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/var/setuid-wrappers/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgtDHA7oDIaRwggGGznNaKZF68rFTziqefSCn1t9ZKe uucp@odin'' -- cgit v1.2.3