Add gitea
This commit is contained in:
parent
359c18bb5d
commit
0a7fa02ecd
4 changed files with 36 additions and 0 deletions
33
modules/gitea.nix
Normal file
33
modules/gitea.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ 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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue