grimm-nixos-laptop/modules/gitea.nix

37 lines
837 B
Nix
Raw Normal View History

2024-05-08 21:50:08 +02:00
{
lib,
config,
inputs,
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
}