nixos/roles/caddy.nix

25 lines
605 B
Nix
Raw Normal View History

2024-12-23 18:19:55 -06:00
{
config,
pkgs,
inputs,
...
}:
2024-12-23 11:20:27 -06:00
2024-12-18 18:19:37 -06:00
{
services.caddy = {
enable = true;
package = pkgs.caddy.withPlugins {
plugins = [ "github.com/tailscale/caddy-tailscale@f21c01b660c896bdd6bacc37178dc00d9af282b4" ];
hash = "sha256-pqM4d4MAKvIJ5O7VkrHDqu36LDTOzUoBa6m4D20wlyw=";
};
2024-12-18 18:19:37 -06:00
email = "nolan@thewordnerd.info";
};
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
}