diff options
-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'' |