getmail move secrets out of rc files

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-02-11 23:19:07 +01:00
parent 38940ad5a9
commit 130d84290f
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 11 additions and 2 deletions

View file

@ -62,7 +62,7 @@ nglib.makeSystem {
shutdownOnExit = true; shutdownOnExit = true;
script = pkgs.writeShellScript "getmail-run" script = pkgs.writeShellScript "getmail-run"
'' ''
export PATH=${with pkgs; lib.makeBinPath [ busybox runit bash getmail6-fixed maildrop-fixed ]}:${pkgs.opensmtpd}/libexec/opensmtpd:$PATH export PATH=${with pkgs; lib.makeBinPath [ jq busybox runit bash getmail6-fixed maildrop-fixed ]}:${pkgs.opensmtpd}/libexec/opensmtpd:$PATH
chown vmail:vmail -R /getmail.d chown vmail:vmail -R /getmail.d

View file

@ -68,7 +68,16 @@ job "email" {
entrypoint = [ "init" ] entrypoint = [ "init" ]
} }
env { vault {
policies = ["getmail-policy"]
}
template {
data = <<EOF
{{ secret "kv/data/getmail" | toJSON }}
EOF
destination = "secrets/getmail.passwd"
change_mode = "restart"
} }
resources { resources {