NixOS ssl certs

https://linuxunplugged.com/493

https://nixos.org/manual/nixos/stable/index.html#module-security-acme

https://github.com/go-acme/lego

https://paste.docs.lol/code/SuitesSacrosanctness

  security.acme = {
    acceptTerms = true;
    defaults = {
      email = "[email protected]";
      dnsProvider = "cloudflare";
      credentialsFile = "/etc/nixos/cloudflare.env";
    };
  };

  services.nginx = {
    enable = true;
    recommendedGzipSettings = true;
    recommendedOptimisation = true;
    recommendedProxySettings = true;
    recommendedTlsSettings = true;
    virtualHosts = {
      "nextcloud" = {
        serverName = "domain.com";
        enableACME = true;
        acmeRoot = null;
        addSSL = true;
        locations."/" = {proxyPass = "http://127.0.0.1:8080"; proxyWebsockets = true;};
      };
    };
  };