mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-10 04:40:05 +00:00
feat(modules/nixos): W.I.P add forgejo service
feat(modules/nixos): add admin module for system wide admin data
This commit is contained in:
parent
636d384150
commit
84bfdec3f2
7 changed files with 168 additions and 4 deletions
56
modules/nixos/services/forgejo/default.nix
Normal file
56
modules/nixos/services/forgejo/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.${namespace}.services.forgejo;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.forgejo = {
|
||||
enable = mkEnableOption "Whether to enable the forgejo git service.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
|
||||
database = {
|
||||
type = "postgres";
|
||||
};
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.thevoid.cafe";
|
||||
ROOT_URL = "https://git.thevoid.cafe/";
|
||||
HTTP_PORT = "3030";
|
||||
};
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: finish this configuration
|
||||
|
||||
services.traefik = {
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
routers.forgejo = {
|
||||
entryPoints = ["websecure"];
|
||||
rule = "Host(`git.thevoid.cafe`)";
|
||||
service = "forgejo";
|
||||
};
|
||||
|
||||
services.forgejo.loadbalancer.server = {
|
||||
url = "http://localhost:3030";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -11,7 +11,7 @@ in {
|
|||
enable = mkEnableOption "Enable the Traefik service.";
|
||||
cloudflareEmail = mkOption {
|
||||
type = types.str;
|
||||
default = "system@thevoid.cafe";
|
||||
default = config.${namespace}.admin.email;
|
||||
example = "system@thevoid.cafe";
|
||||
description = "Specify the E-Mail associated with your Cloudflare account for ACME.";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue