Add forgejo, remove authelia.
This commit is contained in:
parent
dfb52f269c
commit
7d90587392
8 changed files with 179 additions and 68 deletions
57
common/services/gitea.nix
Normal file
57
common/services/gitea.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
|
||||
cfg = config.foehammer.services.forgejo;
|
||||
in {
|
||||
options.foehammer.services.forgejo = {
|
||||
enable = mkEnableOption "Enable Gitea Server";
|
||||
|
||||
port = mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8225;
|
||||
description = ''
|
||||
What external port to serve over.
|
||||
'';
|
||||
};
|
||||
|
||||
ssh-port = mkOption {
|
||||
type = lib.types.port;
|
||||
default = 2222;
|
||||
description = ''
|
||||
What external port to serve over.
|
||||
'';
|
||||
};
|
||||
|
||||
domain = mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
SHOW_REGISTRATION_BUTTON = false;
|
||||
};
|
||||
ui = {
|
||||
SHOW_USER_EMAIL = false;
|
||||
};
|
||||
server = {
|
||||
HTTP_PORT = cfg.port;
|
||||
DOMAIN = cfg.domain;
|
||||
ROOT_URL = "https://${cfg.domain}";
|
||||
SSH_PORT = cfg.ssh-port;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue