mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 19:12:11 +02:00
30 lines
683 B
Nix
30 lines
683 B
Nix
{ config, ... }: {
|
|
services.nginx = { enable = true; };
|
|
|
|
security.acme = {
|
|
acceptTerms = true;
|
|
defaults.email = config.var.git.email;
|
|
};
|
|
|
|
security.acme.certs."hadi.diy" = {
|
|
domain = "hadi.diy";
|
|
extraDomainNames = [ "*.hadi.diy" ];
|
|
group = "nginx";
|
|
|
|
dnsProvider = "cloudflare";
|
|
dnsPropagationCheck = true;
|
|
credentialsFile = config.sops.secrets.cloudflare-dns-token.path;
|
|
};
|
|
|
|
services.nginx.virtualHosts."default" = {
|
|
default = true;
|
|
locations."/" = { return = 444; };
|
|
extraConfig = ''
|
|
server_name _;
|
|
'';
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
networking.firewall.allowedUDPPorts = [ 80 443 ];
|
|
}
|