blob: c15298984b8b01a1330d52f6465db0ae51550d3a [file] [log] [blame]
Skyler Grey8b0e52f2023-05-01 21:31:07 +00001{ config, pkgs, lib, ... }: {
Skyler Grey4f3e6062023-03-04 01:29:29 +00002 services.caddy.enable = true;
Skyler Grey40ab9af2023-05-20 18:03:53 +02003 services.caddy.configFile = lib.pipe ./caddy/caddyfile.nix [
4 import
Skyler Grey0e71dcd2023-05-21 00:05:17 +02005 (f: f { inherit pkgs lib; })
Skyler Grey40ab9af2023-05-20 18:03:53 +02006 builtins.toJSON
7 (pkgs.writeText "caddy.json")
8 ];
Skyler Grey0e71dcd2023-05-21 00:05:17 +02009 services.caddy.package = pkgs.callPackage ../packages/caddy.nix { };
Skyler Grey8b0e52f2023-05-01 21:31:07 +000010 services.caddy.user = "root";
11 systemd.services.caddy.serviceConfig.ProtectHome = lib.mkForce false;
Skyler Grey4f3e6062023-03-04 01:29:29 +000012}