Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caddy: allow disabling default tlsConfig #142787

Closed
Scrumplex opened this issue Oct 24, 2021 · 2 comments
Closed

caddy: allow disabling default tlsConfig #142787

Scrumplex opened this issue Oct 24, 2021 · 2 comments

Comments

@Scrumplex
Copy link
Member

Describe the bug

caddy.nix Adds a tlsConfig block to Caddyfile by default. If you now want to use tls internal Caddy will fail, as there will then be two different TLS configurations at the same time.

It should be possible to disable this default tlsConfig for local setups, which might not use ACME to generate certificates.

Steps To Reproduce

services.caddy = {
  enable = true;
  config = ''
  :8443 {
    tls internal
  }
  '';
};
Oct 24 21:03:29 cosmos caddy[1571913]: run: loading initial config: loading new config: loading http app module: provision http: getting tls app: loading tls app module: tls: invalid configuration: automation policy 1 is the second policy that acts as default/catch-all, but will never be used

Expected behavior

No errors

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"aarch64-linux"`
 - host os: `Linux 5.10.17, NixOS, 21.05.3892.70904d4a992 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - channels(root): `"nixos-21.05.3892.70904d4a992"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

services.caddy
@stale
Copy link

stale bot commented Apr 25, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 25, 2022
@sephii
Copy link
Contributor

sephii commented Feb 21, 2023

From what I can see the default TLS directives got removed in #147973, so this issue can be closed.

Also if you need to globally enable local certs, you can use services.caddy.globalConfig = "local_certs";.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants