mirror of https://gitlab.crans.org/nounous/nixos
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{ config ,lib, self, ... }:
|
|
let
|
|
cfg = config.services.forgejo;
|
|
srv = cfg.settings.server;
|
|
otherHosts = lib.filterAttrs
|
|
(name: _: name != "cransIso" && name != config.networking.hostName)
|
|
self.nixosConfigurations;
|
|
|
|
allGatusEndpoints =
|
|
config.crans.gatus.endpoints
|
|
++ lib.concatMap (machine: machine.config.crans.gatus.endpoints or [ ]) (lib.attrValues otherHosts);
|
|
in
|
|
{
|
|
services.openssh.settings.AcceptEnv = [ "GIT_PROTOCOL" ];
|
|
|
|
services.forgejo = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "git-test.crans.org";
|
|
ROOT_URL = "https://${srv.DOMAIN}";
|
|
HTTP_PORT = 3000;
|
|
};
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
services.gatus = {
|
|
enable = true;
|
|
openFirewall = false;
|
|
settings = {
|
|
web.port = 8080;
|
|
ui.title = "Page Status Crans";
|
|
ui.description = "Show all Status for Crans infrasctructure";
|
|
ui.dashboard-heading = "Crans Status";
|
|
ui.dashboard-subheading = "Monitor the health of Crans endpoints in real-time";
|
|
ui.header = "Crans";
|
|
ui.logo = ../../../assets/logo_crans_dark.png ;
|
|
ui.favicon.default = ../../../assets/logo_crans_dark.png ;
|
|
ui.link = "https://crans.org";
|
|
storage.type = "memory";
|
|
#storage.path = "gatus.db";
|
|
endpoints = allGatusEndpoints;
|
|
|
|
};
|
|
};
|
|
}
|