selfprivacy-nixos-config/git/gitea.nix

72 lines
1.6 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-11-15 10:02:05 +00:00
let
cfg = config.selfprivacy;
2021-11-15 10:02:05 +00:00
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";
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;
};
# 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";
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
};
};
};
}