nix-config/modules/gitea.nix
2021-01-02 12:42:34 +01:00

33 lines
772 B
Nix

{ config, pkgs, lib, ... }:
let
cfg = config.dadada.gitea;
in {
options.dadada.gitea = {
enable = lib.mkEnableOption "Enable gitea";
};
config = lib.mkIf cfg.enable {
services.gitea = {
enable = true;
appName = "dadada Gitea";
rootUrl = "https://git.dadada.li/";
log.level = "Error";
domain = config.networking.domain;
ssh.enable = true;
cookieSecure = true;
enableUnixSocket = true;
database = {
type = "postgres";
};
disableRegistration = true;
};
services.nginx.virtualHosts."git.${config.networking.domain}" = {
enableACME = true;
forceSSL = true;
locations."/".extraConfig = ''
proxy_pass unix:/run/gitea/gitea.sock;
'';
};
};
}