-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
nixos/caddy: validate at build-time #377075
base: master
Are you sure you want to change the base?
Conversation
We used to have this done in the build phase (which, in my opinion, is a better place to have it) before it was removed in 27b7132 (because the way it was done caused an import from derivation, but I think it can be easily adapted). How about doing the check in the build phase? |
@sephii doing this while building is an ever better idea. To catch the errors as early as possible. I am marking my MR as draft and ping you again if I have something. Thanks for the fast response. |
aa16781
to
59bfa80
Compare
@sephii validating is a bit weird.
it always wants to start and log the events, which can not work... so then i discovered
but the config is a valid json... not sure why caddy does this: https://github.com/caddyserver/caddy/blob/9996d6a70ba76a94dfc90548f25fbac0ce9da497/caddyconfig/caddyfile/parse.go#L656 |
Sorry I’m very busy these days. I’ll give it a look soon, maybe next week! |
@sephii no problem. thanks for reaching out. |
59bfa80
to
e79afe2
Compare
I am currently stuck here caddyserver/caddy#6788 (comment) . |
That's not what |
c985fbd
to
da256cd
Compare
da256cd
to
2de2277
Compare
@sephii i finally managed to put something together. please take your time. |
its nice to validate the config before reloading/restarting. same as nginx
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.