From 454ceb7d7db25c5019ed77d25d192875dfc87f6d Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 20 Jun 2022 14:41:36 -0400 Subject: [PATCH] fix email on darwin --- hosts/macbook/default.nix | 1 + modules/mail/himalaya.nix | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/macbook/default.nix b/hosts/macbook/default.nix index 6163504..afad8c0 100644 --- a/hosts/macbook/default.nix +++ b/hosts/macbook/default.nix @@ -10,6 +10,7 @@ darwin.lib.darwinSystem { { gui.enable = true; gui.colorscheme = (import ../../modules/colorscheme/gruvbox); + mailUser = globals.user; nixpkgs.overlays = [ nur.overlay ]; } ../common.nix diff --git a/modules/mail/himalaya.nix b/modules/mail/himalaya.nix index f8e7475..e44ce03 100644 --- a/modules/mail/himalaya.nix +++ b/modules/mail/himalaya.nix @@ -1,6 +1,11 @@ { config, pkgs, lib, ... }: { options = { + mailUser = lib.mkOption { + type = lib.types.str; + description = "User name for the email address."; + default = config.user; + }; mailServer = lib.mkOption { type = lib.types.str; description = "Server name for the email address."; @@ -21,7 +26,7 @@ accounts.email = { maildirBasePath = "$HOME/mail"; accounts = { - home = let address = "${config.user}@${config.mailServer}"; + home = let address = "${config.mailUser}@${config.mailServer}"; in { userName = address; realName = config.fullName;