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.enable = true;
gui.colorscheme = (import ../../modules/colorscheme/gruvbox); gui.colorscheme = (import ../../modules/colorscheme/gruvbox);
mailUser = globals.user;
nixpkgs.overlays = [ nur.overlay ]; nixpkgs.overlays = [ nur.overlay ];
} }
../common.nix ../common.nix

View File

@ -1,6 +1,11 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
options = { options = {
mailUser = lib.mkOption {
type = lib.types.str;
description = "User name for the email address.";
default = config.user;
};
mailServer = lib.mkOption { mailServer = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Server name for the email address."; description = "Server name for the email address.";
@ -21,7 +26,7 @@
accounts.email = { accounts.email = {
maildirBasePath = "$HOME/mail"; maildirBasePath = "$HOME/mail";
accounts = { accounts = {
home = let address = "${config.user}@${config.mailServer}"; home = let address = "${config.mailUser}@${config.mailServer}";
in { in {
userName = address; userName = address;
realName = config.fullName; realName = config.fullName;