2022-08-26 10:21:05 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2021-11-15 10:02:05 +00:00
|
|
|
let
|
2023-11-16 00:00:11 +00:00
|
|
|
cfg = config.selfprivacy;
|
2021-11-15 10:02:05 +00:00
|
|
|
in
|
|
|
|
{
|
2022-08-26 10:21:05 +00:00
|
|
|
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";
|
2023-03-20 15:39:41 +00:00
|
|
|
# log = {
|
|
|
|
# rootPath = "/var/lib/gitea/log";
|
|
|
|
# level = "Warn";
|
|
|
|
# };
|
2021-11-15 10:02:05 +00:00
|
|
|
user = "gitea";
|
|
|
|
database = {
|
|
|
|
type = "sqlite3";
|
|
|
|
host = "127.0.0.1";
|
|
|
|
name = "gitea";
|
|
|
|
user = "gitea";
|
|
|
|
path = "/var/lib/gitea/data/gitea.db";
|
|
|
|
createDatabase = true;
|
|
|
|
};
|
2022-11-04 08:57:00 +00:00
|
|
|
# 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;
|
2023-03-20 15:39:41 +00:00
|
|
|
# cookieSecure = true;
|
2021-11-15 10:02:05 +00:00
|
|
|
settings = {
|
|
|
|
mailer = {
|
|
|
|
ENABLED = false;
|
|
|
|
};
|
|
|
|
ui = {
|
|
|
|
DEFAULT_THEME = "arc-green";
|
2022-12-28 14:46:51 +00:00
|
|
|
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;
|
|
|
|
};
|
2023-03-20 15:39:41 +00:00
|
|
|
session = {
|
|
|
|
COOKIE_SECURE = true;
|
|
|
|
};
|
|
|
|
log = {
|
|
|
|
ROOT_PATH = "/var/lib/gitea/log";
|
|
|
|
LEVEL = "Warn";
|
|
|
|
};
|
2021-11-15 10:02:05 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|