summaryrefslogtreecommitdiff
path: root/modules/mail/default.nix
diff options
context:
space:
mode:
authorGrisha Shipunov2025-07-19 12:27:04 +0000
committerGrisha Shipunov2025-07-19 12:59:37 +0000
commit1baa256be04a8b4e711a7d48a76197b5ffad6637 (patch)
treebbc01e0efd976e8f6185f421e41c650c1e6a53ee /modules/mail/default.nix
parentb602a0c24771b1209003098ffa7ac496642cd084 (diff)
retire toaster
Diffstat (limited to 'modules/mail/default.nix')
-rw-r--r--modules/mail/default.nix138
1 files changed, 0 insertions, 138 deletions
diff --git a/modules/mail/default.nix b/modules/mail/default.nix
deleted file mode 100644
index ba65f2c..0000000
--- a/modules/mail/default.nix
+++ /dev/null
@@ -1,138 +0,0 @@
-{ config, pkgs, ... }:
-let
- mbsyncConf = ./mbsyncrc;
-in
-{
- environment.systemPackages = with pkgs; [
- isync
- msmtp
- neomutt
- notmuch
- alot
- w3m
- links2
- ];
-
- environment.shellAliases = {
- mutt = "neomutt";
- };
-
- sops.secrets = {
- "mail/oxapentane.com" = {
- owner = config.users.users."0xa".name;
- };
- "mail/shipunov.xyz" = {
- owner = config.users.users."0xa".name;
- };
- "mail/dvb.solutions" = {
- owner = config.users.users."0xa".name;
- };
- "mail/tlm.solutions" = {
- owner = config.users.users."0xa".name;
- };
- };
-
- programs.msmtp = {
- enable = true;
- setSendmail = true;
- extraConfig = ''
- account mail@oxapentane.com
- host smtp.migadu.com
- port 587
- from *@oxapentane.com
- user mail@oxapentane.com
- passwordeval cat ${config.sops.secrets."mail/oxapentane.com".path}
- auth on
- tls on
- tls_trust_file /etc/ssl/certs/ca-certificates.crt
- logfile ~/.msmtp.log
-
- account grigory@shipunov.xyz
- host smtp.migadu.com
- port 587
- from *@shipunov.xyz
- user grigory@shipunov.xyz
- passwordeval cat ${config.sops.secrets."mail/shipunov.xyz".path}
- auth on
- tls on
- tls_trust_file /etc/ssl/certs/ca-certificates.crt
- logfile ~/.msmtp.log
-
- account dump@dvb.solutions
- host smtp.migadu.com
- port 587
- from dump@dvb.solutions
- user dump@dvb.solutions
- passwordeval cat ${config.sops.secrets."mail/dvb.solutions".path}
- auth on
- tls on
- tls_trust_file /etc/ssl/certs/ca-certificates.crt
- logfile ~/.msmtp.log
-
- account grigory@tlm.solutions
- host smtp.migadu.com
- port 587
- from grigory@tlm.solutions
- user grigory@tlm.solutions
- passwordeval cat ${config.sops.secrets."mail/tlm.solutions".path}
- auth on
- tls on
- tls_trust_file /etc/ssl/certs/ca-certificates.crt
- logfile ~/.msmtp.log
- '';
- };
-
- systemd.user = {
-
- # Service and timer to sync imap to local maildir
- services.mbsync = {
- enable = true;
- after = [
- "graphical.target"
- "network-online.target"
- ];
- script = ''
- ${pkgs.isync}/bin/mbsync -q -a --config=${mbsyncConf}
- '';
- serviceConfig = {
- Type = "oneshot";
- };
- };
-
- timers.mbsync = {
- enable = true;
- wantedBy = [ "timers.target" ];
- timerConfig = {
- Unit = "mbsync.service";
- OnBootSec = "5m";
- OnUnitInactiveSec = "11m";
- };
- };
-
- # service and timer to flush the msmtp queue
- services.flush-msmtpq = {
- enable = true;
- after = [
- "graphical.target"
- "network-online.target"
- ];
- script = ''
- ${pkgs.msmtp}/bin/msmtp-queue -r
- '';
- serviceConfig = {
- Type = "oneshot";
- };
- };
-
- timers.flush-msmtpq = {
- enable = true;
- wantedBy = [ "timers.target" ];
- timerConfig = {
- Unit = "flush-msmtpq.service";
- OnBootSec = "11m";
- OnUnitInactiveSec = "13m";
- };
- };
-
- };
-}