add gitea
This commit is contained in:
parent
240fad9ff2
commit
cb2d12ac14
2 changed files with 60 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
./cryptpad.nix
|
||||
./fossil.nix
|
||||
./foundryvtt.nix
|
||||
./gitea.nix
|
||||
./matrix-front.nix
|
||||
./rss.nix
|
||||
./search.nix
|
||||
|
|
59
nixos/boxes/vpsfree1/gitea.nix
Normal file
59
nixos/boxes/vpsfree1/gitea.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
let
|
||||
httpPort = 8083;
|
||||
sshPort = 2222;
|
||||
domain = "git.cyplo.dev";
|
||||
baseurl = "https://${domain}";
|
||||
path = "/var/lib/gitea";
|
||||
in {
|
||||
imports = [ ../nginx.nix ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"${domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:" + toString httpPort;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
containers.gitea = {
|
||||
autoStart = true;
|
||||
forwardPorts = [
|
||||
{
|
||||
containerPort = httpPort;
|
||||
hostPort = httpPort;
|
||||
}
|
||||
{
|
||||
containerPort = sshPort;
|
||||
hostPort = sshPort;
|
||||
}
|
||||
];
|
||||
bindMounts = {
|
||||
"${path}" = {
|
||||
hostPath = "${path}";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
config = { config, pkgs, ... }: {
|
||||
system.stateVersion = "22.05";
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
domain = domain;
|
||||
rootUrl = baseurl;
|
||||
httpPort = httpPort;
|
||||
disableRegistration = true;
|
||||
stateDir = path;
|
||||
ssh = {
|
||||
enable = true;
|
||||
clonePort = sshPort;
|
||||
};
|
||||
settings = { server = { START_SSH_SERVER = true; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue