nix: add vps setup

This commit is contained in:
Oleksandr Smirnov 2026-01-14 21:45:55 +02:00
parent 028a52d9ff
commit 50015669e1
No known key found for this signature in database
10 changed files with 433 additions and 0 deletions

28
nix/modules/forgejo.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
let
domain = "git.olexsmir.xyz";
in
{
services.caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy http://localhost:3001
'';
services.forgejo = {
enable = true;
database.type = "sqlite3";
settings = {
server = {
DOMAIN = domain;
ROOT_URL = "https://${domain}/";
HTTP_PORT = 3001;
# TODO: ? setup ssh
};
DEFAULT.APP_NAME = "my git";
repository.DISABLE_STARS = true;
service.DISABLE_REGISTRATION = true;
actions.ENABLED = false; # TODO:
};
};
# TODO: setup woodpecker
}