Enable Caddy & Gitea

David Crompton 2023-10-26 13:12:34 -04:00
parent ab368ed303
commit 0f7bb03390
2 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,7 @@
{ ... }: { { ... }: {
imports = [ imports = [
./servers/caddy.nix
./servers/xpra.nix ./servers/xpra.nix
./servers/gitea.nix
]; ];
} }

View File

@ -0,0 +1,21 @@
{ config, pkgs, lib, ... }:
{
services.caddy = {
enable = true;
};
# Need 80 & 443 Enabled so Caddy is externally accessible
networking.firewall = let
ports = [ 80 443 ];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
services.caddy.virtualHosts = lib.mkAfter {
"*.ws.kcnhub.com" = {
extraConfig = ''
error 404
'';
};
};
}