server services

This commit is contained in:
2025-07-15 15:24:33 +02:00
parent 555b11eab0
commit 378edf29a4
6 changed files with 115 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
{
self,
pkgs,
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.server.caddy;
in {
options = {
server.caddy.enable = mkEnableOption "Enables caddy";
};
config = mkIf cfg.enable {
networking.firewall = let
ports = [80 443];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
services.caddy = {
enable = true;
# package = self.packages.${pkgs.system}.caddy-with-plugins;
};
};
}