1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

chore: more firezone

This commit is contained in:
oddlama 2025-02-04 23:53:19 +01:00
parent eeb248b582
commit bbb76ae5ec
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 528 additions and 66 deletions

View file

@ -60,7 +60,7 @@ index c4e06bc58..89533fb81 100644
- {:error, :send_email, _reason, _effects_so_far} ->
+ {:error, :send_email, reason, _effects_so_far} ->
+ Logger.info("aaaaaaaaaaaaaaaaaa", reason: inspect(reason))
+ Logger.info("failed to send email", reason: inspect(reason))
changeset =
Ecto.Changeset.add_error(
changeset,
@ -103,12 +103,12 @@ index 15037e0a3..475c4ddfb 100644
- from_email: compile_config!(:outbound_email_from)
+ adapter: compile_config!(:outbound_email_adapter),
+ from_email: compile_config!(:outbound_email_from),
+ protocol: :ssl,
+ relay: System.get_env("OUTBOUND_EMAIL_RELAY"),
+ port: 465,
+ protocol: String.to_atom(System.get_env("OUTBOUND_EMAIL_SMTP_PROTOCOL")),
+ relay: System.get_env("OUTBOUND_EMAIL_SMTP_HOST"),
+ port: String.to_integer(System.get_env("OUTBOUND_EMAIL_SMTP_PORT")),
+ auth: [
+ username: System.get_env("OUTBOUND_EMAIL_USERNAME"),
+ password: System.get_env("OUTBOUND_EMAIL_PASSWORD")
+ username: System.get_env("OUTBOUND_EMAIL_SMTP_USERNAME"),
+ password: System.get_env("OUTBOUND_EMAIL_SMTP_PASSWORD")
+ ]
] ++ compile_config!(:outbound_email_adapter_opts)

View file

@ -3,6 +3,7 @@
}:
{
lib,
nixosTests,
fetchFromGitHub,
beamPackages,
pnpm_9,
@ -41,9 +42,6 @@ beamPackages.mixRelease rec {
cat >> config/runtime.exs <<EOF
config :tzdata, :data_dir, System.get_env("TZDATA_DIR")
EOF
# TODO replace https://firezone.statuspage.io with custom link,
# unfortunately simple replace only works at compile time
'';
postBuild = ''
@ -115,8 +113,12 @@ beamPackages.mixRelease rec {
};
};
passthru.tests = {
inherit (nixosTests) firezone;
};
meta = {
description = "Backend server and Admin UI for the Firezone zero-trust access platform";
description = "Backend server for the Firezone zero-trust access platform";
homepage = "https://github.com/firezone/firezone";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [