Skyler Grey | 8b0e52f | 2023-05-01 21:31:07 +0000 | [diff] [blame] | 1 | { config, pkgs, lib, ... }: { |
Skyler Grey | 4f3e606 | 2023-03-04 01:29:29 +0000 | [diff] [blame] | 2 | services.caddy.enable = true; |
Skyler Grey | 40ab9af | 2023-05-20 18:03:53 +0200 | [diff] [blame] | 3 | services.caddy.configFile = lib.pipe ./caddy/caddyfile.nix [ |
| 4 | import |
Skyler Grey | 0e71dcd | 2023-05-21 00:05:17 +0200 | [diff] [blame^] | 5 | (f: f { inherit pkgs lib; }) |
Skyler Grey | 40ab9af | 2023-05-20 18:03:53 +0200 | [diff] [blame] | 6 | builtins.toJSON |
| 7 | (pkgs.writeText "caddy.json") |
| 8 | ]; |
Skyler Grey | 0e71dcd | 2023-05-21 00:05:17 +0200 | [diff] [blame^] | 9 | services.caddy.package = pkgs.callPackage ../packages/caddy.nix { }; |
Skyler Grey | 8b0e52f | 2023-05-01 21:31:07 +0000 | [diff] [blame] | 10 | services.caddy.user = "root"; |
| 11 | systemd.services.caddy.serviceConfig.ProtectHome = lib.mkForce false; |
Skyler Grey | 4f3e606 | 2023-03-04 01:29:29 +0000 | [diff] [blame] | 12 | } |