helm/modules/services/gitea.nix

36 lines
708 B
Nix
Raw Normal View History

2020-03-28 22:48:43 -07:00
{ config, options, pkgs, lib, ... }:
with lib;
2019-11-17 22:25:29 -08:00
{
2020-03-28 22:48:43 -07:00
options.modules.services.gitea = {
enable = mkOption {
type = types.bool;
default = false;
};
2019-11-18 18:41:35 -08:00
};
2019-11-17 22:25:29 -08:00
2020-03-28 22:48:43 -07:00
config = mkIf config.modules.services.gitea.enable {
# I prefer git@... ssh addresses over gitea@...
users.users.git = {
useDefaultShell = true;
home = "/var/lib/gitea";
group = "gitea";
};
services.gitea = {
enable = true;
log.level = "Info";
2019-11-18 18:41:35 -08:00
user = "git";
2020-03-28 22:48:43 -07:00
database = {
user = "git";
type = "postgres";
};
useWizard = false;
disableRegistration = true;
2019-11-18 21:22:23 -08:00
2020-03-28 22:48:43 -07:00
# We're assuming SSL-only connectivity
cookieSecure = true;
};
2019-11-18 18:41:35 -08:00
};
2019-11-17 22:25:29 -08:00
}