fix email on darwin

This commit is contained in:
Noah Masur 2022-06-20 14:41:36 -04:00
parent 98dcc471b4
commit 454ceb7d7d
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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;