Added git server
This commit is contained in:
parent
e08c4b27e2
commit
2821a76450
3 changed files with 32 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
||||||
./networking/vpn-host.nix
|
./networking/vpn-host.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
./services/site.nix
|
./services/site.nix
|
||||||
|
./services/forgejo.nix
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
|
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
|
||||||
age.secrets.tailscale.file = ./tailscale.age;
|
age.secrets.tailscale.file = ./tailscale.age;
|
||||||
|
|
|
||||||
18
services/forgejo.nix
Normal file
18
services/forgejo.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
ROOT_URL = "https://git.per-aspera.space";
|
||||||
|
HTTP_ADDR = "0.0.0.0";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
SSH_DOMAIN = "git.per-aspera.space";
|
||||||
|
SSH_PORT = 2222;
|
||||||
|
};
|
||||||
|
service = { DISABLE_REGISTRATION = false; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 3000 2222 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -7,6 +7,7 @@ let
|
||||||
dnsRecords = [
|
dnsRecords = [
|
||||||
domain
|
domain
|
||||||
"jellyfin.${domain}"
|
"jellyfin.${domain}"
|
||||||
|
"git.${domain}"
|
||||||
# Add more records here as needed
|
# Add more records here as needed
|
||||||
# "api.${domain}"
|
# "api.${domain}"
|
||||||
# "mail.${domain}"
|
# "mail.${domain}"
|
||||||
|
|
@ -85,6 +86,18 @@ in {
|
||||||
|
|
||||||
locations."/" = { proxyPass = "http://localhost:8096"; };
|
locations."/" = { proxyPass = "http://localhost:8096"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtualHosts."git.${domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
|
||||||
|
locations."/" = { proxyPass = "http://localhost:3000"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
# Local git access to avoid NAT hairpinning
|
||||||
|
virtualHosts."git.homelab" = {
|
||||||
|
locations."/" = { proxyPass = "http://localhost:3000"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue