From 014c45c7bd3d3dbc5ad08e33fd19b95c007ca6d9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 30 May 2021 16:29:31 +0200 Subject: acme@surtr: ... --- hosts/surtr/tls.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'hosts') diff --git a/hosts/surtr/tls.nix b/hosts/surtr/tls.nix index 17c49d1e..5b583235 100644 --- a/hosts/surtr/tls.nix +++ b/hosts/surtr/tls.nix @@ -1,5 +1,7 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: let + knotCfg = config.services.knot; + knotDNSCredentials = zone: pkgs.writeText "lego-credentials" '' EXEC_PATH=${knotDNSExec zone}/bin/update-dns.sh ''; @@ -12,21 +14,21 @@ let owner=''${fqdn%"${zone}."} - knotc zone-begin "${zone}" + ${knotCfg.cliWrappers}/bin/knotc zone-begin "${zone}" case "''${mode}" in present) - knotc zone-set ${zone} "''${owner}" 300 TXT "''${challenge}" + ${knotCfg.cliWrappers}/bin/knotc zone-set ${zone} "''${owner}" 300 TXT "''${challenge}" ;; cleanup) - knotc zone-unset ${zone} "''${owner}" TXT "''${challenge}" + ${knotCfg.cliWrappers}/bin/knotc zone-unset ${zone} "''${owner}" TXT "''${challenge}" ;; *) exit 2 ;; esac - knotc zone-commit "${zone}" + ${knotCfg.cliWrappers}/bin/knotc zone-commit "${zone}" ''; in { config = { -- cgit v1.2.3