chore: put acme configuration in own file

This commit is contained in:
Khaïs COLIN 2024-08-22 16:50:23 +00:00
parent 7d21dcd59d
commit 65e8baabba
3 changed files with 17 additions and 13 deletions

16
acme.nix Normal file
View file

@ -0,0 +1,16 @@
{ base-domain, ... }:
{
security.acme = {
certs.${base-domain}.extraDomainNames = [
"${base-domain}"
"sourcehut.${base-domain}"
"meta.sourcehut.${base-domain}"
"git.sourcehut.${base-domain}"
];
acceptTerms = true;
defaults = {
email = "khais.colin+letsencrypt@gmail.com";
dnsProvider = "namecheap";
};
};
}

View file

@ -3,6 +3,7 @@
imports = [
./hardware-configuration.nix
./firewall.nix
(import ./acme.nix { base-domain = "005540.xyz"; })
./userprogs.nix
./sourcehut.nix
];

View file

@ -43,19 +43,6 @@ in
};
};
security.acme = {
certs.${base-domain}.extraDomainNames = [
"${fqdn}"
"meta.${fqdn}"
"git.${fqdn}"
];
acceptTerms = true;
defaults = {
email = "khais.colin+letsencrypt@gmail.com";
dnsProvider = "namecheap";
};
};
services.nginx = {
enable = true;
recommendedTlsSettings = true;