From 2c07d8e24aee3634e1bb31b24d11f61f72b81083 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Wed, 11 May 2022 21:08:16 -0400 Subject: [PATCH] add encrypted mail password --- modules/mail/himalaya.nix | 6 +++++- modules/mail/mailpass.age | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 modules/mail/mailpass.age diff --git a/modules/mail/himalaya.nix b/modules/mail/himalaya.nix index f791b00..d59ef65 100644 --- a/modules/mail/himalaya.nix +++ b/modules/mail/himalaya.nix @@ -11,6 +11,8 @@ home-manager.users.${config.user} = { + home.packages = with pkgs; [ age ]; + programs.himalaya = { enable = true; }; accounts.email = { @@ -59,7 +61,9 @@ mu.enable = false; notmuch.enable = false; passwordCommand = - "cat /home/${config.user}/.config/himalaya/passwd"; + "${pkgs.age}/bin/age --decrypt --identity /home/${config.user}/.ssh/id_rsa ${ + builtins.toString ./mailpass.age + }"; smtp = { host = serverHostname; port = 587; diff --git a/modules/mail/mailpass.age b/modules/mail/mailpass.age new file mode 100644 index 0000000..ed7a5de --- /dev/null +++ b/modules/mail/mailpass.age @@ -0,0 +1,10 @@ +age-encryption.org/v1 +-> ssh-rsa 6vVbxg +X7xJSc42VFglgjPxz45J3uoGtyZZdI6qyIEL+ZKxzhgYTa66/LVhJT/sLJlg7lnp +DoZCGEvVIrTzlysHeWvNKUIkK/iiRLdsqJybPWs/hai9J2q3OcXehbvU+adHhhxn +7y3Ycle+XeQ2QnFtMZBL0niQNAo3CMNKO6SNQeFwzwGgHmPmAF2JVnwxB5l09Y+e +12T6aQCuh1pZ7oRjFQHg3T1aqXcslyBLLNuT4CXkIQ4hXSPAJGHUcy+rj8+3NsXW +BwI7w3CtBLGDaZue6FBucD3ii4lIcBtUzx9BsgHfsrHPvgx8jAt6cLyWmMFwQO0Y +43zNsHUHok2GEzKE1zLcAA +--- HyCGtqqnrN0ukBo11RTE7l3HUvT2o+qxvlghoY0cY80 +:¼ElnÁ<Í2029I70J/Za™\¢{ÛÓ{œX3÷´Î!³¾B™qè™Dƒ:gÇÌG~Wº®I³vWjm \ No newline at end of file