How to override protecthome on caddy


I currently have a complete dev stack setup made with docker, and I want to learn how to do the same in the nix way step by step.

First step : I want to use caddy as a local webserver, but my vhosts directories are located under my home directory.
Caddy package has a default systemd protectHome configuration set to “true” and therefore serving files located under my home directory ends up with a 403 forbidden error.

Question : how can I override this protectHome configuration ?


Hello, = lib.mkForce false; should work.


Thx nurelin, it works !

1 Like