Enable Caddy & Gitea

master
David Crompton 2023-10-26 13:12:34 -04:00
parent ad2ef22d8c
commit 0996e3953c
2 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,7 @@
{ ... }: {
imports = [
./servers/caddy.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
'';
};
};
}