nixos-server/services/gitea.nix
2024-05-25 01:01:07 +02:00

34 lines
739 B
Nix

{ pkgs, ... }: {
name = "gitea";
config = {
services.gitea = {
enable = true;
appName = "My awesome Gitea server"; # Give the site a name
database = {
type = "postgres";
host = "postgres.containers";
port = 3306;
name = "gitea";
user = "gitea";
createDatabase = false;
passwordFile = ../secrets/gitea_postgres_pass;
};
settings.server = {
DOMAIN = "localhost";
ROOT_URL = "http://localhost/";
HTTP_PORT = 3001;
};
};
};
ports = {
tcp = [ 3001 ];
udp = [];
http = 3001;
};
hosts = [ "localhost" ];
volumes = [{
name = "gitea-statedir";
mountPoint = "/var/lib/gitea";
}]; # TODO
}