diff options
author | sefidel <contact@sefidel.net> | 2023-02-06 18:08:33 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-02-06 18:08:33 +0900 |
commit | 2788edf8f6ddc0a5ccd141db51321cd21abb5adf (patch) | |
tree | cbca719739f3eeef32dd47cb9d0fa823f09c4915 /nixos/cobalt/services/acme.nix | |
parent | bdf36408a71b1b3993a9552637d86495cb677b86 (diff) | |
download | nixrc-2788edf8f6ddc0a5ccd141db51321cd21abb5adf.tar.gz nixrc-2788edf8f6ddc0a5ccd141db51321cd21abb5adf.zip |
feat: merge colmena to nixos
Diffstat (limited to 'nixos/cobalt/services/acme.nix')
-rw-r--r-- | nixos/cobalt/services/acme.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/cobalt/services/acme.nix b/nixos/cobalt/services/acme.nix new file mode 100644 index 0000000..b41ae1c --- /dev/null +++ b/nixos/cobalt/services/acme.nix @@ -0,0 +1,26 @@ +let + poorObfuscation = y: x: "${x}@${y}"; +in +{ + security.acme = { + acceptTerms = true; + defaults.email = poorObfuscation "sefidel.com" "postmaster"; + certs = { + "sefidel.com" = { + domain = "*.sefidel.com"; + dnsProvider = "hetzner"; + dnsPropagationCheck = true; + credentialsFile = "/persist/secrets/hetzner.key"; + }; + }; + }; + + environment.persistence."/persist".directories = [ + "/var/lib/acme" + ]; + + deployment.keys."hetzner.key" = { + keyCommand = [ "pass" "show" "server/hetzner-dns" ]; + destDir = "/persist/secrets"; + }; +} |