2015-12-05 12:41:20 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
systemd.services.letsencrypt = {
|
|
|
|
path = [ pkgs.simp_le ];
|
|
|
|
|
|
|
|
restartIfChanged = false;
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
};
|
|
|
|
|
|
|
|
script = ''
|
|
|
|
mkdir -p /etc/sslcerts/acmeroot
|
|
|
|
cd /etc/sslcerts
|
|
|
|
|
2016-03-04 15:14:06 +00:00
|
|
|
simp_le \
|
|
|
|
-d git.gebner.org \
|
|
|
|
-d mail.gebner.org \
|
|
|
|
--default_root $PWD/acmeroot \
|
|
|
|
-f account_key.json -f fullchain.pem -f key.pem \
|
|
|
|
--email gebner@gebner.org
|
2016-03-04 15:16:55 +00:00
|
|
|
|
|
|
|
cp key.pem key-dovecot.pem
|
|
|
|
chown dovecot2 key-dovecot.pem
|
2015-12-05 12:41:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
startAt = "04:00";
|
|
|
|
};
|
|
|
|
}
|