[ssl] do not rely on sops file
This commit is contained in:
parent
7d9dedb845
commit
31f958944c
1 changed files with 18 additions and 16 deletions
|
|
@ -7,21 +7,6 @@ in
|
||||||
options.shb.ssl = {
|
options.shb.ssl = {
|
||||||
enable = lib.mkEnableOption "selfhostblocks.ssl";
|
enable = lib.mkEnableOption "selfhostblocks.ssl";
|
||||||
|
|
||||||
sopsFile = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = ''Sops file location.
|
|
||||||
|
|
||||||
To use Linode to prove the dns challenge, the content of the file should be the following,
|
|
||||||
with XXX replaced by your Linode API token.
|
|
||||||
|
|
||||||
LINODE_HTTP_TIMEOUT=10
|
|
||||||
LINODE_POLLING_INTERVAL=10
|
|
||||||
LINODE_PROPAGATION_TIMEOUT=240
|
|
||||||
LINODE_TOKEN=XXX
|
|
||||||
'';
|
|
||||||
example = "secrets/haproxy.yaml";
|
|
||||||
};
|
|
||||||
|
|
||||||
domain = lib.mkOption {
|
domain = lib.mkOption {
|
||||||
description = lib.mdDoc "Domain to serve sites under.";
|
description = lib.mdDoc "Domain to serve sites under.";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
@ -34,6 +19,23 @@ in
|
||||||
example = "linode";
|
example = "linode";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
credentialsFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = ''Credentials file location for the chosen DNS provider.
|
||||||
|
|
||||||
|
The content of this file must expose environment variables as written in the
|
||||||
|
[documentation](https://go-acme.github.io/lego/dns/) of each DNS provider.
|
||||||
|
|
||||||
|
For example, if the documentation says the credential must be located in the environment
|
||||||
|
variable DNSPROVIDER_TOKEN, then the file content must be:
|
||||||
|
|
||||||
|
DNSPROVIDER_TOKEN=xyz
|
||||||
|
|
||||||
|
You can put non-secret environment variables here too or use shb.ssl.additionalcfg instead.
|
||||||
|
'';
|
||||||
|
example = "/run/secrets/ssl";
|
||||||
|
};
|
||||||
|
|
||||||
dnsResolver = lib.mkOption {
|
dnsResolver = lib.mkOption {
|
||||||
description = lib.mdDoc "IP of a DNS server used to resolve hostnames.";
|
description = lib.mdDoc "IP of a DNS server used to resolve hostnames.";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
@ -62,8 +64,8 @@ in
|
||||||
defaults = {
|
defaults = {
|
||||||
email = cfg.adminEmail;
|
email = cfg.adminEmail;
|
||||||
inherit (cfg) dnsProvider dnsResolver;
|
inherit (cfg) dnsProvider dnsResolver;
|
||||||
credentialsFile = config.sops.secrets.acme.path;
|
|
||||||
enableDebugLogs = false;
|
enableDebugLogs = false;
|
||||||
|
credentialsFile = cfg.credentialsFile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sops.secrets.acme = {
|
sops.secrets.acme = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue