mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-24 09:06:15 +01:00
getmail move secrets out of rc files
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
38940ad5a9
commit
130d84290f
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue