initial commit
Some checks failed
Nix CI / build (push) Failing after 31s

This commit is contained in:
Rustam Efimov 2026-04-01 08:50:01 +03:00
commit 30ce0dafc2
No known key found for this signature in database
195 changed files with 8902 additions and 0 deletions

View file

@ -0,0 +1,64 @@
{
config,
lib,
...
}:
let
inherit (config.machine.forgejo)
enable
database
domain
port
;
in
{
environment.systemPackages = lib.optionals enable [
config.services.forgejo.package
];
services.openssh.settings.AllowUsers = [
"forgejo"
];
services.forgejo = {
inherit enable;
database = {
type = "postgres";
inherit (database) host;
inherit (database) port;
};
lfs.enable = true;
settings = {
DEFAULT = {
APP_NAME = "RuJect Forgejo";
};
server = {
DOMAIN = if (domain != null) then domain else "[::1]";
ROOT_URL = if (domain != null) then "https://${domain}/" else "http://[::1]/";
HTTP_PORT = port;
};
service = {
SHOW_REGISTRATION_BUTTON = true;
REGISTER_EMAIL_CONFIRM = true;
ENABLE_NOTIFY_MAIL = true;
};
"repository.signing" = {
DEFAULT_TRUST_MODEL = "committer";
};
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
picture = {
AVATAR_MAX_FILE_SIZE = 10485760;
AVATAR_MAX_WIDTH = 8192;
AVATAR_MAX_HEIGHT = 8192;
AVATAR_MAX_ORIGIN_SIZE = 5242880;
};
ui = {
DEFAULT_THEME = "catppuccin-mocha";
THEMES = "forgejo-auto,forgejo-light,forgejo-dark,catppuccin-mocha";
};
};
};
}