blob: 3e5c2f683139829b4ec41ad7f61c5451861da99a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{
containers.gitea = {
autoStart = true;
privateNetwork = true;
hostBridge = "br-lan0";
localMacAddress = "02:00:00:00:00:03";
config = { lib, pkgs, config, ... }: {
# Network
networking.interfaces.eth0.useDHCP = true;
networking.firewall.allowedTCPPorts = [ 80 22 ]; # Caddy + ssh
# Gitea
services.gitea = {
enable = true;
#user = "git"; # So ssh cloning uses git@gitea
};
# SSH for repositories
services.openssh.enable = true;
# Reverse proxy
services.caddy = {
enable = true;
virtualHosts.":80".extraConfig = ''
reverse_proxy localhost:3000
'';
};
system.stateVersion = "25.11";
};
};
}
|