Make caddy use caddy.json
diff --git a/modules/caddy.nix b/modules/caddy.nix
index 44a5a29..834db88 100644
--- a/modules/caddy.nix
+++ b/modules/caddy.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, ... }: {
+{ config, pkgs, lib, ... }: {
services.caddy.enable = true;
- services.caddy.extraConfig = builtins.readFile ./caddy/Caddyfile;
+ services.caddy.configFile = ./caddy/caddy.json;
+ services.caddy.package = pkgs.callPackage ../packages/caddy.nix {
+ vendorSha256 = "sha256-3KcoOAB+YkOU8qKM75uQo58/dljRBmP25dionr9r2dc=";
+ };
+ services.caddy.user = "root";
+ systemd.services.caddy.serviceConfig.ProtectHome = lib.mkForce false;
}