nixos/roles/caddy.nix

21 lines
490 B
Nix

{ config, pkgs, ... }:
{
services.caddy = {
enable = true;
package = pkgs.callPackage ../pkgs/caddy.nix { };
email = "nolan@thewordnerd.info";
};
networking.firewall.allowedTCPPorts = [
80
443
];
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;
}