From ab30ca1c6d2fbfd7f5ad19062f426a54954a4ba2 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@hoyer.xyz>
Date: Wed, 21 May 2025 08:45:30 +0200
Subject: [PATCH] feat(sgx/mail): configure postfix root and admin aliases

Added configuration for postfix rootAlias and extraAliases using metacfg user name. This ensures proper email routing for root and admin users.
---
 systems/x86_64-linux/sgx/mail.nix | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/systems/x86_64-linux/sgx/mail.nix b/systems/x86_64-linux/sgx/mail.nix
index aebd3a1..c8b67db 100644
--- a/systems/x86_64-linux/sgx/mail.nix
+++ b/systems/x86_64-linux/sgx/mail.nix
@@ -1,8 +1,10 @@
-{ pkgs, ... }:
+{ pkgs, config, ... }:
 {
   environment.systemPackages = with pkgs; [
     mailutils
     mutt
   ];
   services.postfix.enable = true;
+  services.postfix.rootAlias = config.metacfg.user.name;
+  services.postfix.extraAliases = "admin: root";
 }