diff options
author | sefidel <contact@sefidel.net> | 2023-02-15 23:24:03 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-02-15 23:24:03 +0900 |
commit | 0512baf6dd03ea0e9ac5e74d81b530d75c40e5df (patch) | |
tree | 6ce0fba1d065a39be08bb7aa129ff8906942f04b /home/profiles | |
parent | 0d17dc7b7227e58e269140cbd488330dd62c09b2 (diff) | |
download | nixrc-0512baf6dd03ea0e9ac5e74d81b530d75c40e5df.tar.gz nixrc-0512baf6dd03ea0e9ac5e74d81b530d75c40e5df.zip |
feat(home/messaging): use sops for mail secret
Diffstat (limited to 'home/profiles')
-rw-r--r-- | home/profiles/base/default.nix | 4 | ||||
-rw-r--r-- | home/profiles/messaging/default.nix | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/home/profiles/base/default.nix b/home/profiles/base/default.nix index 98f767f..530c8e6 100644 --- a/home/profiles/base/default.nix +++ b/home/profiles/base/default.nix @@ -292,9 +292,5 @@ in longitude = "127.2"; }; }; - - home.file.".pam-gnupg".text = '' - 77FE99210D6D1175076B284229CE8818A7112C9B - ''; }; } 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 = { |