1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

Add gitea functionality

This commit is contained in:
Stefan Ellmauthaler 2022-10-25 12:16:00 +02:00
parent 0b5fe07122
commit 6980d3facf
Failed to extract signature
3 changed files with 37 additions and 0 deletions

View File

@ -14,10 +14,12 @@ with lib; {
smailserver.enable = mkEnableOption "Set up simple mail server";
unbound.enable = mkEnableOption "Set unbound dns up";
grocy.enable = mkEnableOption "Set up grocy";
gitea.enable = mkEnableOption "Set up gitea";
};
imports = [
./acme.nix
./gitea.nix
./grocy.nix
./nextcloud.nix
./nginx.nix

29
modules/server/gitea.nix Normal file
View File

@ -0,0 +1,29 @@
{
config,
pkgs,
lib,
...
}:
with lib; {
config = let
cfg = config.elss.server.gitea;
in
mkIf cfg.enable {
services.nginx.virtualHosts."git.ellmauthaler.net" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:3001";
};
};
services.gitea = {
enable = true;
appName = "gitea: ellmauthaler.net gitea service";
database = {
type = "postgres";
host = "/run/posgresql";
};
};
};
}

View File

@ -19,6 +19,12 @@ with lib; {
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
}
];
authentication = ''
local gitea all ident map=gitea-users
'';
identMap = ''
gitea-users gitea gitea
'';
};
};
}