nixos-config/cafe/host.nix

33 lines
631 B
Nix
Raw Normal View History

2024-01-03 17:23:41 +01:00
{ pkgs, ... }:
let gitea = {
host = "10.10.0.1";
local = "10.10.0.2";
};
in
{
# [CONTAINERS]
containers.gitea = {
autoStart = true;
ephemeral = true;
privateNetwork = true;
hostAddress = gitea.host;
localAddress = gitea.local;
config = ./gitea.nix;
};
# [NGINX]
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"localhost" = {
locations."/".proxyPass = "http://${gitea.local}:3001";
};
};
};
# [NETWORK]
# networking.firewall.allowedTCPPorts = [ 80 ];
# networking.firewall.allowedUDPPorts = [ ];
}