42 lines
935 B
Nix
42 lines
935 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.servers.gitea;
|
|
setup = import ./setup.nix { inherit lib config; };
|
|
in
|
|
{
|
|
imports = [
|
|
./gitea-actions-runners/ryujinx.nix
|
|
./gitea-actions-runners/nixos.nix
|
|
];
|
|
|
|
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
|
|
config = {
|
|
sops.secrets = lib.mkIf cfg.enable { gitea.sopsFile = ../../secrets/env.yaml; };
|
|
services.gitea = lib.mkIf cfg.enable {
|
|
enable = true;
|
|
DOMAIN = cfg.host;
|
|
ROOT_URL = cfg.url;
|
|
settings = {
|
|
session.COOKIE_SECURE = true;
|
|
server.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;
|
|
};
|
|
};
|
|
};
|
|
}
|