2024-09-14 16:57:22 +05:30
|
|
|
{ config, inputs, pkgs, ... }: {
|
|
|
|
sops = {
|
|
|
|
secrets = {
|
|
|
|
"digitalocean/token_file" = {
|
|
|
|
mode = "444";
|
|
|
|
owner = config.users.users.root.name;
|
|
|
|
group = config.users.users.root.group;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-07-03 17:03:34 +05:30
|
|
|
services.caddy = {
|
|
|
|
enable = true;
|
2024-09-14 16:07:45 +05:30
|
|
|
package = inputs.caddy.packages.${pkgs.system}.caddy;
|
2024-07-03 17:03:34 +05:30
|
|
|
email = "admin@acomputer.lol";
|
2024-09-14 16:57:22 +05:30
|
|
|
globalConfig = ''
|
|
|
|
acme_dns digitalocean {env.DO_API_TOKEN}
|
|
|
|
'';
|
2024-07-03 17:03:34 +05:30
|
|
|
};
|
2024-09-14 16:57:22 +05:30
|
|
|
systemd.services.caddy.serviceConfig.EnvironmentFile = config.sops.secrets."digitalocean/token_file".path;
|
2024-08-31 17:44:26 +05:30
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
2024-07-03 17:03:34 +05:30
|
|
|
}
|
|
|
|
|