selfprivacy-nixos-config/git/gitea.nix

67 lines
1.5 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-11-15 10:02:05 +00:00
let
cfg = config.services.userdata;
in
{
fileSystems = lib.mkIf cfg.useBinds {
"/var/lib/gitea" = {
device = "/volumes/${cfg.gitea.location}/gitea";
options = [ "bind" ];
};
};
2021-11-15 10:02:05 +00:00
services = {
gitea = {
enable = cfg.gitea.enable;
stateDir = "/var/lib/gitea";
user = "gitea";
database = {
type = "sqlite3";
host = "127.0.0.1";
name = "gitea";
user = "gitea";
path = "/var/lib/gitea/data/gitea.db";
createDatabase = true;
};
# ssh = {
# enable = true;
# clonePort = 22;
# };
2021-11-15 10:02:05 +00:00
lfs = {
enable = true;
contentDir = "/var/lib/gitea/lfs";
};
appName = "SelfPrivacy git Service";
repositoryRoot = "/var/lib/gitea/repositories";
domain = "git.${cfg.domain}";
2023-01-08 08:29:08 +00:00
rootUrl = "https://git.${cfg.domain}/";
2021-11-15 10:02:05 +00:00
httpAddress = "0.0.0.0";
httpPort = 3000;
settings = {
mailer = {
ENABLED = false;
};
ui = {
DEFAULT_THEME = "arc-green";
SHOW_USER_EMAIL = false;
2021-11-15 10:02:05 +00:00
};
picture = {
DISABLE_GRAVATAR = true;
};
admin = {
ENABLE_KANBAN_BOARD = true;
};
repository = {
FORCE_PRIVATE = false;
};
session = {
COOKIE_SECURE = true;
};
log = {
ROOT_PATH = "/var/lib/gitea/log";
LEVEL = "Warn";
};
2021-11-15 10:02:05 +00:00
};
};
};
}