summary refs log tree commit diff stats
path: root/user/settings
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings')
-rw-r--r--user/settings/isync.nix5
-rw-r--r--user/settings/mail.nix25
-rw-r--r--user/settings/msmtp.nix5
-rw-r--r--user/settings/satoshipay.nix31
4 files changed, 56 insertions, 10 deletions
diff --git a/user/settings/isync.nix b/user/settings/isync.nix
deleted file mode 100644
index b96db87d..00000000
--- a/user/settings/isync.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ config, pkgs, ... }:
-
-{
-  home.file.".mbsyncrc".source = ../isync/.mbsyncrc;
-}
diff --git a/user/settings/mail.nix b/user/settings/mail.nix
new file mode 100644
index 00000000..3ce9e548
--- /dev/null
+++ b/user/settings/mail.nix
@@ -0,0 +1,25 @@
+{ config, pkgs, ... }:
+
+{
+  home.packages = [
+    pkgs.html2text
+  ];
+  accounts.email = {
+    maildirBasePath = "mail";
+  };
+  programs.mbsync = {
+    enable = true;
+    extraConfig = ''
+      CopyArrivalDate yes
+      FSync no
+    '';
+  };
+  services.mbsync = {
+    enable = true;
+    frequency = "*:6/15";
+    postExec = "${config.programs.emacs.finalPackage}/bin/emacsclient -e (mu4e-update-index)";
+  };
+  programs.msmtp = {
+    enable = true;
+  };
+}
diff --git a/user/settings/msmtp.nix b/user/settings/msmtp.nix
deleted file mode 100644
index 45c2f460..00000000
--- a/user/settings/msmtp.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ config, pkgs, ... }:
-
-{
-  home.file.".msmtprc".source = ../msmtp/.msmtprc;
-}
diff --git a/user/settings/satoshipay.nix b/user/settings/satoshipay.nix
index 6516bd59..822f6b6f 100644
--- a/user/settings/satoshipay.nix
+++ b/user/settings/satoshipay.nix
@@ -49,6 +49,37 @@ in
     }
   ];
 
+  accounts.email.accounts.satoshipay = let
+    address = "alan@satoshipay.io";
+  in
+  {
+    inherit address;
+    realName = "Alan Pearce";
+    flavor = "gmail.com";
+    passwordCommand = "${pkgs.python3Packages.keyring}/bin/keyring get satoshipay-google-mail ${address}";
+    folders = {
+      inbox = "INBOX";
+      drafts = "[Gmail]/Drafts";
+      sent = "[Gmail]/Sent Mail";
+      trash = "[Gmail]/Bin";
+    };
+    imap = {
+      tls.enable = true;
+    };
+    smtp = {
+      tls.enable = true;
+    };
+    mbsync = {
+      enable = true;
+      create = "maildir";
+      remove = "maildir";
+      expunge = "both";
+    };
+    msmtp = {
+      enable = true;
+    };
+  };
+
   home.file.".npmrc".text = ''
     @satoshipay:registry=https://registry.npmjs.org/
   '';