nixcloud/nixcloud-webservices

nixcloud.TLS default email

Closed this issue · 4 comments

fgaz commented

It would be nice if there was a way to specify a global default email in addition to the per-cert ones

so according to the documentation: https://github.com/nixcloud/nixcloud-webservices/blob/master/documentation/nixcloud.TLS.md

we have this syntax:

nixcloud.TLS.certs = {
  "example.com-ACME" = {
    domain = "example.com";
    mode = "ACME";
    email = "foo@example.com";
    reload = [ "postifx.service" "myservice.service" ];
  };
  "example.com-selfsigned" = {
    domain = "example.com";
    mode = "selfsigned";
    email = "foo@example.com";
  };
  "example.com-usersupplied" = {
    domain = "example.com";
    mode = {
      tls_certificate="/root/.tls/fullchain.pem";
      tls_certificate_key="/root/.tls/key.pem";
    };
    email = "foo@example.com";
  };
};

and you propose this:

nixcloud.TLS = {
  email = "foo@example.com";
  certs = {
    "example.com-ACME" = {
      domain = "example.com";
      mode = "ACME";
      reload = [ "postifx.service" "myservice.service" ];
    };
    "example.com-selfsigned" = {
      domain = "example.com";
      mode = "selfsigned";
    };
    "example.com-usersupplied" = {
      domain = "example.com";
      mode = {
        tls_certificate="/root/.tls/fullchain.pem";
        tls_certificate_key="/root/.tls/key.pem";
      };
    };
  };
};

if you really want that, we can implement that. wouldn't be much work.

more complicated than expected...

implemented in 6c61dc1

fgaz commented

Thanks again!