Danilo Reyes 41ced09790
Some checks failed
Weekly NixOS Build & Cache / build-and-cache (push) Failing after 10m43s
single runner
2025-11-02 10:10:00 -06:00

42 lines
952 B
Nix

{
lib,
config,
pkgs,
...
}:
let
setup = import ../factories/mkserver.nix { inherit lib config; };
cfg = config.my.servers.gitea;
in
{
imports = [
../nix/gitea-actions-runners/nixos.nix
];
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
config = lib.mkIf (cfg.enable && config.my.secureHost) {
sops.secrets.gitea.sopsFile = ../../secrets/env.yaml;
services.gitea = {
inherit (cfg) enable;
settings = {
session.COOKIE_SECURE = true;
server = {
DOMAIN = cfg.host;
ROOT_URL = cfg.url;
HTTP_PORT = cfg.port;
};
mailer = {
ENABLED = true;
PROTOCOL = "sendmail";
FROM = config.my.smtpemail;
SENDMAIL_PATH = "${pkgs.msmtp}/bin/msmtp";
};
};
database = {
socket = config.my.postgresSocket;
type = "postgres";
createDatabase = false;
};
};
};
}