slowly getting to acme setup
This commit is contained in:
parent
9634b57b86
commit
12186e8005
2 changed files with 28 additions and 11 deletions
|
@ -2,18 +2,38 @@
|
|||
inherit (config) conf;
|
||||
inherit (lib) mkIf;
|
||||
in mkIf conf.nginx.enable {
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "mira.cp.0909@gmail.com";
|
||||
certs = {
|
||||
"twoneis.site" = {
|
||||
group = "nginx";
|
||||
extraDomainNames = [ "*.twoneis.site" ];
|
||||
dnsProvider = "porkbun";
|
||||
email = "mira.cp.0909@gmail.com";
|
||||
environmentFile = "/root/porkbun-creds";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "acme" ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
".twoneis.site" = {
|
||||
default = {
|
||||
serverName = ".twoneis.site";
|
||||
forceSSL = false;
|
||||
locations = {
|
||||
"/" = {
|
||||
return = "404";
|
||||
};
|
||||
default = true;
|
||||
rejectSSL = true;
|
||||
locations."/" = {
|
||||
return = "404";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue