refactor
This commit is contained in:
parent
1206380efd
commit
7203fc1ed9
51 changed files with 175 additions and 108 deletions
38
nixos/viridian/services/forgejo/default.nix
Normal file
38
nixos/viridian/services/forgejo/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{config, ...}: {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
stateDir = "/srv/services/forgejo";
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.sajenim.dev";
|
||||
ROOT_URL = "https://git.sajenim.dev";
|
||||
HTTP_PORT = 3131;
|
||||
LANDING_PAGE = "/jasmine";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
log.LEVEL = "Info";
|
||||
};
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http.routers = {
|
||||
forgejo = {
|
||||
rule = "Host(`git.sajenim.dev`)";
|
||||
entryPoints = [
|
||||
"websecure"
|
||||
];
|
||||
middlewares = [
|
||||
"crowdsec"
|
||||
"geoblock"
|
||||
];
|
||||
service = "forgejo";
|
||||
};
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http.services = {
|
||||
forgejo.loadBalancer.servers = [
|
||||
{url = "http://127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}";}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue