mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-05-13 15:51:09 +02:00
caddy: make a shared module
This commit is contained in:
parent
ff44839229
commit
f511f7d146
6 changed files with 53 additions and 42 deletions
24
shared/caddy/default.nix
Normal file
24
shared/caddy/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
email = "ca@${config.networking.domain}";
|
||||
logFormat = "format console";
|
||||
globalConfig = ''
|
||||
servers {
|
||||
metrics
|
||||
}
|
||||
'';
|
||||
virtualHosts.":2018" = {
|
||||
extraConfig = ''
|
||||
metrics
|
||||
'';
|
||||
logFormat = ''
|
||||
output discard
|
||||
'';
|
||||
};
|
||||
};
|
||||
systemd.services.caddy.environment.XDG_DATA_HOME = "/var/lib";
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue