about summary refs log tree commit diff
path: root/home/profiles/messaging
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-02-15 23:24:03 +0900
committersefidel <contact@sefidel.net>2023-02-15 23:24:03 +0900
commit0512baf6dd03ea0e9ac5e74d81b530d75c40e5df (patch)
tree6ce0fba1d065a39be08bb7aa129ff8906942f04b /home/profiles/messaging
parent0d17dc7b7227e58e269140cbd488330dd62c09b2 (diff)
downloadnixrc-0512baf6dd03ea0e9ac5e74d81b530d75c40e5df.tar.gz
nixrc-0512baf6dd03ea0e9ac5e74d81b530d75c40e5df.zip
feat(home/messaging): use sops for mail secret
Diffstat (limited to 'home/profiles/messaging')
-rw-r--r--home/profiles/messaging/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/home/profiles/messaging/default.nix b/home/profiles/messaging/default.nix
index 14b31a1..d0978a0 100644
--- a/home/profiles/messaging/default.nix
+++ b/home/profiles/messaging/default.nix
@@ -12,7 +12,6 @@ let
       key = lib.elemAt x' 1;
       action = lib.last x';
     });
-  mailPass = x: if pkgs.stdenv.isLinux then "${pkgs.pass}/bin/pass show emails/${x}" else "";
   mbsyncCmd = if pkgs.stdenv.isLinux then "${config.programs.mbsync.package}/bin/mbsync" else "";
 in
 {
@@ -25,6 +24,9 @@ in
 
   config = lib.mkIf cfg.enable (lib.mkMerge [
     (lib.mkIf pkgs.stdenv.isLinux {
+
+      sops.secrets.sef-imap-password = { };
+
       accounts.email = {
         maildirBasePath = "${config.home.homeDirectory}/mail";
 
@@ -74,7 +76,7 @@ in
           primary = true;
           realName = "***REMOVED***";
           userName = poorObfuscation "sefidel.com" "contact";
-          passwordCommand = mailPass "sef";
+          passwordCommand = "cat ${config.sops.secrets.sef-imap-password.path}";
         };
 
         accounts.zach = {