nixos/roles/caddy.nix

21 lines
490 B
Nix
Raw Normal View History

2024-12-23 11:20:27 -06:00
{ config, pkgs, ... }:
2024-12-18 18:19:37 -06:00
{
services.caddy = {
enable = true;
2024-12-23 11:20:27 -06:00
package = pkgs.callPackage ../pkgs/caddy.nix { };
2024-12-18 18:19:37 -06:00
email = "nolan@thewordnerd.info";
};
networking.firewall.allowedTCPPorts = [
80
443
];
2024-12-23 11:20:27 -06:00
age.secrets.tsAuthKey = {
file = ../secrets/ts_auth_key.age;
owner = config.services.caddy.user;
group = config.services.caddy.group;
mode = "600";
};
systemd.services.caddy.serviceConfig.EnvironmentFile = config.age.secrets.tsAuthKey.path;
2024-12-18 18:19:37 -06:00
}