mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Add gitea functionality (#6)
* Add gitea functionality with default activation for the server module
This commit is contained in:
parent
0b5fe07122
commit
cba8241002
@ -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
|
||||
@ -37,6 +39,7 @@ with lib; {
|
||||
nextcloud.enable = mkDefault true;
|
||||
unbound.enable = mkDefault true;
|
||||
grocy.enable = mkDefault true;
|
||||
gitea.enable = mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
29
modules/server/gitea.nix
Normal file
29
modules/server/gitea.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -19,6 +19,12 @@ with lib; {
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
authentication = ''
|
||||
local gitea all ident map=gitea-users
|
||||
'';
|
||||
identMap = ''
|
||||
gitea-users gitea gitea
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user