feat(caddy): install and replace nginx
This commit is contained in:
parent
500c704cf4
commit
33af7eaadf
27 changed files with 212 additions and 158 deletions
28
modules/nixos/features/caddy.nix
Normal file
28
modules/nixos/features/caddy.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
dataDir = "/srv/caddy";
|
||||
globalConfig = ''
|
||||
auto_https disable_redirects
|
||||
'';
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "festive-steed-fit@duck.com";
|
||||
certs."fi33.buzz" = {
|
||||
group = config.services.caddy.group;
|
||||
domain = "fi33.buzz";
|
||||
extraDomainNames = [ "*.fi33.buzz" ];
|
||||
dnsProvider = "porkbun";
|
||||
dnsPropagationCheck = true;
|
||||
credentialsFile = config.age.secrets."porkbun-api".path;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets."porkbun-api".file = ../../../secrets/porkbun-api.age;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue