diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-04-27 13:35:30 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-04-27 13:35:30 +0200 |
commit | ec15b0dfb49af79e13f380719c850194762dec63 (patch) | |
tree | ac80658980cde3547d0bc6105e7f9f39db3c06ef | |
parent | bf23c34ff47ee937262d562ff95a3806ca96b970 (diff) | |
download | nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar.gz nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar.bz2 nixos-ec15b0dfb49af79e13f380719c850194762dec63.tar.xz nixos-ec15b0dfb49af79e13f380719c850194762dec63.zip |
rmail
-rw-r--r-- | custom/uucp.nix | 28 | ||||
-rw-r--r-- | 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 { | |||
172 | 172 | ||
173 | environment.systemPackages = with pkgs; [ | 173 | environment.systemPackages = with pkgs; [ |
174 | uucp | 174 | uucp |
175 | (pkgs.writeScriptBin "rmail" '' | 175 | ({ stdenv }: stdenv.lib.mkDerivation { |
176 | #!${pkgs.stdenv.shell} | 176 | name = "rmail"; |
177 | src = pkgs.writeScript "rmail" '' | ||
178 | #!${pkgs.stdenv.shell} | ||
177 | 179 | ||
178 | # Dummy UUCP rmail command for postfix/qmail systems | 180 | # Dummy UUCP rmail command for postfix/qmail systems |
179 | 181 | ||
180 | IFS=" " read junk from junk junk junk junk junk junk junk relay | 182 | IFS=" " read junk from junk junk junk junk junk junk junk relay |
181 | 183 | ||
182 | case "$from" in | 184 | case "$from" in |
183 | *[@!]*) ;; | 185 | *[@!]*) ;; |
184 | *) from="$from@$relay";; | 186 | *) from="$from@$relay";; |
185 | esac | 187 | esac |
186 | 188 | ||
187 | exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" | 189 | exec /var/setuid-wrappers/sendmail -i -f "$from" -- "$@" |
188 | '') | 190 | ''; |
191 | builder = pkgs.writeScript "builder" '' | ||
192 | #!${stdenv.shell} | ||
193 | mkdir -p $out/bin | ||
194 | ln -s ${src} $out/bin/rmail | ||
195 | ''; | ||
196 | }); | ||
189 | ]; | 197 | ]; |
190 | }; | 198 | }; |
191 | } | 199 | } |
@@ -342,7 +342,7 @@ in rec { | |||
342 | enable = true; | 342 | enable = true; |
343 | nodeName = "ymir"; | 343 | nodeName = "ymir"; |
344 | remoteNodes = { | 344 | remoteNodes = { |
345 | "isaac" = ["pwd" "rmail"]; # legacy name for odin | 345 | "isaac" = ["pwd" "${pkgs.rmail}/bin/rmail"]; # legacy name for odin |
346 | }; | 346 | }; |
347 | sshUser = { | 347 | sshUser = { |
348 | openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/var/setuid-wrappers/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgtDHA7oDIaRwggGGznNaKZF68rFTziqefSCn1t9ZKe uucp@odin'' | 348 | openssh.authorizedKeys.keys = [ ''no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/var/setuid-wrappers/uucico" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgtDHA7oDIaRwggGGznNaKZF68rFTziqefSCn1t9ZKe uucp@odin'' |