grimm-nixos-laptop/modules/gitea.nix

31 lines
814 B
Nix
Raw Permalink Normal View History

2024-05-11 22:55:59 +02:00
{ config, pkgs, ... }:
2024-05-08 21:49:37 +02:00
let
inherit (config.networking) domain;
inherit (config.serverConfig) ports vhosts;
2024-05-08 21:50:08 +02:00
in
{
2024-05-08 21:49:37 +02:00
services.gitea = {
enable = true;
settings = {
service.DISABLE_REGISTRATION = true;
server = {
HTTP_PORT = vhosts.gitea_host.port;
ROOT_URL = "https://${vhosts.gitea_host.host}/";
2024-05-08 21:49:37 +02:00
DISABLE_SSH = false;
SSH_DOMAIN = domain;
START_SSH_SERVER = true;
BUILTIN_SSH_SERVER_USER = "git";
SSH_PORT = ports.gitea_ssh_port.port;
# SSH_LISTEN_HOST="::"; # fixme?
# SSH_AUTHORIZED_PRINCIPALS_ALLOW="username";
2024-05-08 21:49:37 +02:00
};
# log.LEVEL = "Debug";
2024-05-08 21:49:37 +02:00
"ssh.minimum_key_sizes".RSA = 2048;
"git.timeout".MIGRATE = 6000;
};
lfs.enable = true;
};
2024-05-08 21:50:08 +02:00
environment.systemPackages = with pkgs; [ gitea ];
2024-05-08 21:49:37 +02:00
}