Merge branch 'forgejo'
This commit is contained in:
commit
353276d91a
2 changed files with 38 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
imports = [./caddy.nix ./index ./seafile.nix ./bot.nix ./immich.nix ./matrix.nix ./mail.nix];
|
||||
imports = [./caddy.nix ./index ./seafile.nix ./bot.nix ./immich.nix ./matrix.nix ./mail.nix ./forgejo.nix];
|
||||
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
|
||||
}
|
||||
|
|
|
|||
37
system/server/forgejo.nix
Normal file
37
system/server/forgejo.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
DOMAIN = "git.jsw.tf";
|
||||
in {
|
||||
config =
|
||||
lib.mkIf config.niksos.server
|
||||
{
|
||||
services.caddy.virtualHosts.${DOMAIN}.extraConfig = ''
|
||||
request_body {
|
||||
max_size 512M
|
||||
}
|
||||
reverse_proxy localhost:9004
|
||||
'';
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "postgres";
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
inherit DOMAIN;
|
||||
ROOT_URL = "https://${DOMAIN}/";
|
||||
HTTP_PORT = 9004;
|
||||
};
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue