server: add forgjo initial configuration
This commit is contained in:
parent
6360a976f2
commit
331a15f0e6
2 changed files with 34 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./website
|
./website
|
||||||
|
./forgejo
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
modules/nixos/server/services/forgejo/default.nix
Normal file
33
modules/nixos/server/services/forgejo/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.ooknet.server) services domain;
|
||||||
|
inherit (lib) mkIf elem;
|
||||||
|
in {
|
||||||
|
config = mkIf (elem "forgejo" services) {
|
||||||
|
ooknet.server = {
|
||||||
|
webserver.caddy.enable = true;
|
||||||
|
database.postgresql.enable = true;
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
forgejo = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.${domain}";
|
||||||
|
ROOT_URL = "https://git.${domain}";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
caddy.virtualHosts = {
|
||||||
|
"git.${domain}".extraConfig = ''
|
||||||
|
reverse_proxy 127.0.0.1:3000
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue