setup forgejo
This commit is contained in:
parent
9e17ff86d9
commit
4ab3b20d9f
3 changed files with 26 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
||||||
./profiles/wireguard-server.nix
|
./profiles/wireguard-server.nix
|
||||||
./profiles/backups.nix
|
./profiles/backups.nix
|
||||||
./profiles/caddy.nix
|
./profiles/caddy.nix
|
||||||
|
./profiles/forgejo.nix
|
||||||
]
|
]
|
||||||
++ (with systemProfiles; [
|
++ (with systemProfiles; [
|
||||||
core.security
|
core.security
|
||||||
|
|
|
@ -33,6 +33,13 @@ in {
|
||||||
reverse_proxy ${hopper}
|
reverse_proxy ${hopper}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
forgejo = {
|
||||||
|
hostName = "git.${domain}";
|
||||||
|
useACMEHost = domain;
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}
|
||||||
|
'';
|
||||||
|
};
|
||||||
other = {
|
other = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
respond 404
|
respond 404
|
||||||
|
|
18
hosts/rackserv/profiles/forgejo.nix
Normal file
18
hosts/rackserv/profiles/forgejo.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{vars, ...}: {
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
database.type = "postgres";
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
session.COOKIE_SECURE = true;
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.${vars.domain}";
|
||||||
|
ROOT_URL = "https://git.${vars.domain}";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
HTTP_ADDR = "127.0.0.1";
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.restic.backups.rackserv.paths = ["/var/lib/forgejo/dump"];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue