diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-12-27 16:16:20 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-12-27 16:16:20 +0200 |
commit | 8953c93b60e31357a60112f8f707a1bb6cff0572 (patch) | |
tree | f5d6dda1e5318ec701a860d16369ce62bdb3bcb5 | |
parent | dc9f6237850bc05f8c6504435dcee77b21d18ab3 (diff) | |
download | nixos-configuration-8953c93b60e31357a60112f8f707a1bb6cff0572.tar.gz nixos-configuration-8953c93b60e31357a60112f8f707a1bb6cff0572.tar.bz2 nixos-configuration-8953c93b60e31357a60112f8f707a1bb6cff0572.zip |
feat: wip: trying to do smtp config
-rw-r--r-- | home-manager/stvnliu/emails.nix | 12 | ||||
-rw-r--r-- | home-manager/stvnliu/home.nix | 1 | ||||
-rw-r--r-- | home-manager/stvnliu/programs/msmtp.nix | 9 | ||||
-rw-r--r-- | nixos/msmtp.nix | 20 |
4 files changed, 42 insertions, 0 deletions
diff --git a/home-manager/stvnliu/emails.nix b/home-manager/stvnliu/emails.nix new file mode 100644 index 0000000..ed55dda --- /dev/null +++ b/home-manager/stvnliu/emails.nix @@ -0,0 +1,12 @@ +{ + pkgs, + config, + ... +}: { + accounts.email.accounts.default = { + primary = true; + address = "z.liu@outlook.com.gr"; + flavor = "outlook.office365.com"; + realName = "Zhongheng Liu"; + }; +} diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix index aef2927..e17cc16 100644 --- a/home-manager/stvnliu/home.nix +++ b/home-manager/stvnliu/home.nix @@ -18,6 +18,7 @@ ./xdg.nix ./stylix.nix ./spicetify.nix + ./emails.nix ./scripts ./programs ./packages diff --git a/home-manager/stvnliu/programs/msmtp.nix b/home-manager/stvnliu/programs/msmtp.nix new file mode 100644 index 0000000..ae2a791 --- /dev/null +++ b/home-manager/stvnliu/programs/msmtp.nix @@ -0,0 +1,9 @@ +{ + pkgs, + config, + ... +}: { + programs.msmtp = { + enable = true; + }; +} diff --git a/nixos/msmtp.nix b/nixos/msmtp.nix new file mode 100644 index 0000000..f5b272d --- /dev/null +++ b/nixos/msmtp.nix @@ -0,0 +1,20 @@ +{ + pkgs, + config, + ... +}: { + programs.msmtp = { + enable = true; + accounts = { + default = { + auth = true; + tls = true; + # try setting `tls_starttls` to `false` if sendmail hangs + from = "<from address here>"; + host = "smtp-mail.outlook.com"; + user = "z.liu@outlook.com.gr"; + passwordeval = "cat /secrets/smtp_password.txt"; + }; + }; + }; +} |