From e2f89e5e16d138325350553287039159d0d27702 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sun, 19 Jan 2025 13:54:31 -0500 Subject: [PATCH] Infini-DL360/hydra: attempt to properly set up email --- hosts/Infini-DL360/hydra.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hosts/Infini-DL360/hydra.nix b/hosts/Infini-DL360/hydra.nix index e27a260..056b126 100644 --- a/hosts/Infini-DL360/hydra.nix +++ b/hosts/Infini-DL360/hydra.nix @@ -1,4 +1,4 @@ -{ config, common, secrets, ... }: +{ config, common, secrets, pkgs, ... }: let domain = common.subdomain "hydra"; in @@ -18,20 +18,24 @@ in smtpHost = common.email.smtp.address; useSubstitutes = true; environmentFile = config.secrets.hydra; - extraEnv = { - EMAIL_SENDER_TRANSPORT_sasl_username = common.email.outgoing; - EMAIL_SENDER_TRANSPORT_port = toString common.email.smtp.SSLTLS; - EMAIL_SENDER_TRANSPORT_ssl = "ssl"; - }; extraConfig = '' binary_cache_secret_key_file = ${secrets.binary-cache-private-key} allow_import_from_derivation = true + email_notification = 1 timeout = 3600 ''; }; + systemd.services.hydra-queue-runner.path = [ pkgs.msmtp ]; + systemd.services.hydra-server.path = [ pkgs.msmtp ]; + + users.users = { + hydra.extraGroups = [ "smtp" ]; + hydra-queue-runner.extraGroups = [ "smtp" ]; + }; + nix.settings.allowed-uris = [ "github:" "git+https://github.com/"